@Test
public void links_PageNotRelevant() {

    PDPage destPage = new PDPage();
    PDAnnotationLink annotation = new PDAnnotationLink();
    PDPageDestination dest = new PDPageFitDestination();
    dest.setPage(destPage);
    annotation.setDestination(dest);
    List<PDAnnotation> annotations = Arrays.asList(annotation);
    oldPage.setAnnotations(annotations);
    PDDocument doc = new PDDocument();
    doc.addPage(oldPage);
    LookupTable<PDAnnotation> annotationsLookup = new AnnotationsDistiller(doc).retainRelevantAnnotations(lookup);
    assertEquals(0, newPage.getAnnotations().size());
    assertTrue(annotationsLookup.isEmpty());
}