ua = fopFactory.newFOUserAgent();
handler = factory.createDocumentHandler(ua, MimeConstants.MIME_PDF);
assertTrue(handler instanceof PDFDocumentHandler);
ua = fopFactory.newFOUserAgent();
overrideHandler = new PDFDocumentHandler();
overrideHandler.setContext(new IFContext(ua));
ua.setDocumentHandlerOverride(overrideHandler);
handler = factory.createDocumentHandler(ua, null);
assertTrue(handler == overrideHandler);