@Test
public void mergeFormsWithProcSet() throws IOException {

    try (PDDocument anotherDoc = PDFParser.parse(SeekableSources.inMemorySeekableSourceFrom(
            getClass().getClassLoader().getResourceAsStream("pdf/forms/simple_form_proc_set.pdf")))) {
        PDAcroForm destination = new PDAcroForm(new PDDocument());
        AcroFormUtils.mergeDefaults(anotherDoc.getDocumentCatalog().getAcroForm(), destination);
        COSBase procSet = destination.getDefaultResources().getCOSObject().getItem(COSName.PROC_SET);
        assertNotNull(procSet);
        assertEquals(2, ((COSArray) procSet).size());
    }
}