@Test
public void discardBeads() throws IOException {

    try (PDDocument document = PDFParser.parse(SeekableSources.inMemorySeekableSourceFrom(
            getClass().getClassLoader().getResourceAsStream("pdf/shared_resource_dic_w_images.pdf")))) {
        PDPage page = document.getPage(0);
        page.setThreadBeads(Arrays.asList(new PDThreadBead()));
        assertFalse(page.getThreadBeads().isEmpty());
        PDPage copy = new PageCopier(false).copyOf(page);
        assertTrue(copy.getThreadBeads().isEmpty());
    }
}