Prev |  | Next

## 6.4. Authorized Signature of the new CEO

### Initial Situation

The board of executives has changed.

### Problem

PDF documents which are used for contracts need to have a valid (visible) signature. So, the signature of the new CEO must be used.

The new and the old signature exist as files, but you have to give them the same file name. Otherwise, all programs have to be recompiled the next time the CEO changes.

### Solution Approach

The image file is compared byte-wise with the signature image from the PDF documents.

### Solution

    @Test
    public void verifyNewSignatureOnLastPage() throws Exception {
      String filename = "documentUnderTest.pdf";
      String newSignatureImage = "images/CEO-signature.png";

      AssertThat.document(filename)
                .restrictedTo(LAST_PAGE)
                .containsImage(newSignatureImage)
      ;
    }

Prev | Up | Next
6.3. Name of the Former CEO | Home | 6.5. New Logo on each Page