@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); }
public void rotate(int pageNumber, Rotation rotation) { LOG.debug("Applying rotation of {} degrees to page {}", rotation.getDegrees(), pageNumber); PDPage page = document.getPage(pageNumber - 1); rotate(page, rotation); }
PdfRotator { public void rotate(int pageNumber, Rotation rotation) { LOG.debug("Applying rotation of {} degrees to page {}", rotation.getDegrees(), pageNumber); PDPage page = document.getPage(pageNumber - 1); rotate(page, rotation); } }
PdfRotator { public void rotate(int pageNumber, Rotation rotation) { LOG.debug("Applying rotation of {} degrees to page {}", rotation.getDegrees(), pageNumber); PDPage page = document.getPage(pageNumber - 1); rotate(page, rotation); } PdfRotator(PDDocument document); }
PdfRotator { public void rotate(int pageNumber, Rotation rotation) { LOG.debug("Applying rotation of {} degrees to page {}", rotation.getDegrees(), pageNumber); PDPage page = document.getPage(pageNumber - 1); rotate(page, rotation); } PdfRotator(PDDocument document); void rotate(int pageNumber, Rotation rotation); static void rotate(PDPage page, Rotation rotation); }
PdfRotator { public void rotate(int pageNumber, Rotation rotation) { LOG.debug("Applying rotation of {} degrees to page {}", rotation.getDegrees(), pageNumber); PDPage page = document.getPage(pageNumber - 1); rotate(page, rotation); } PdfRotator(PDDocument document); void rotate(int pageNumber, Rotation rotation); static void rotate(PDPage page, Rotation rotation);  }