6.3.
Name of the Former CEO
The board of executives has changed.
The name of the former CEO must be changed in the header of newly created PDF documents.
PDFUnit provides methods to check documents for the non-existence
of text.
@Test
public void verifyOldCEONotPresent() throws Exception {
String filename = "documentUnderTest.pdf";
String oldCEO = "NameOfOldCEO";
PageRegion header = createHeaderRegion();
AssertThat.document(filename)
.restrictedTo(header)
.hasText()
.notContaining(oldCEO)
;
}