@Test
public void noExceptionMissingXObjects() {

    PDDocument doc = new PDDocument();
    PDPage page0 = new PDPage();
    COSDictionary rootRes = new COSDictionary();
    page0.getCOSObject().setItem(COSName.RESOURCES, rootRes);
    rootRes.setItem(COSName.XOBJECT, null);
    doc.getDocumentCatalog().getPages().add(page0);
    new ResourceDictionaryCleaner().accept(doc);
}