@Test
public void clonePageDestinationSameType() {

    PDPage origin = new PDPage();
    PDPage newPage = new PDPage();
    PDPageFitHeightDestination destination = new PDPageFitHeightDestination();
    destination.setPage(origin);
    destination.setLeft(20);
    PDPageDestination cloned = OutlineUtils.clonePageDestination(destination, newPage);
    assertThat(cloned, is(instanceOf(PDPageFitHeightDestination.class)));
    assertEquals(newPage, cloned.getPage());
    assertEquals(20, ((PDPageFitHeightDestination) cloned).getLeft());
}