@Test
public void singlePage() {

    PDDocument document = mock(PDDocument.class);
    PDPage page = mock(PDPage.class);
    when(page.getRotation()).thenReturn(180);
    when(document.getPage(2)).thenReturn(page);
    new PdfRotator(document).rotate(3, Rotation.DEGREES_270);
    verify(page).setRotation(90);
}