@Test public void addAndGetHeaders() { Header[] headers = { new Header("foo", 1), // $NON-NLS-1$ new Header("bar", 2), // $NON-NLS-1$ new Header("baz", 3) // $NON-NLS-1$ }; for (Header header : headers) { htmlSerializerContext.addHeader(header.getText(), header.getLevel()); } List<Header> result = htmlSerializerContext.getHeaders(); for (int i = 0; i < result.size(); i++) { assertTrue(EqualsBuilder.reflectionEquals(result.get(i), headers[i], true)); } }