assertEquals(1, headers.size());
List<HeaderValue> clauses = headers.get(0).getHeaderValues();
assertEquals(1, clauses.size());
assertTrue(clauses.get(0) instanceof Clause);
Clause clause = (Clause)clauses.get(0);
AssignmentExpression element = attribute ? clause.getAttribute(name) : clause.getDirective(name);
if (expected != null) {
assertNotNull(element);
assertEquals(expected, element.getValue());
}
else {
assertNull(element);
}
}