@Test
public void linksGoTo_PageRelevant() {

    PDAnnotationLink annotation = new PDAnnotationLink();
    PDPageDestination dest = new PDPageFitDestination();
    dest.setPage(oldPage);
    PDActionGoTo action = new PDActionGoTo();
    action.setDestination(dest);
    annotation.setAction(action);
    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(annotationsLookup.lookup(annotation), newPage.getAnnotations().get(0));
}