@Override
    public Producer createProducer() throws Exception {
        return new FopProducer(this, fopFactory, outputType.getFormatExtended());
    }
@Test
    public void encryptPdfWithUserPassword() throws Exception {
        if (!canTest()) {
            // cannot run on CI
            return;
        }

        Endpoint endpoint = context().getEndpoint("fop:pdf");
        Producer producer = endpoint.createProducer();
        Exchange exchange = new DefaultExchange(context);
        final String password = "secret";
        exchange.getIn().setHeader("CamelFop.Encrypt.userPassword", password);
        exchange.getIn().setBody(FopHelper.decorateTextWithXSLFO("Test Content"));

        producer.process(exchange);
        try (InputStream inputStream = exchange.getMessage().getBody(InputStream.class)) {
            PDDocument document = Loader.loadPDF(new RandomAccessReadBuffer(inputStream), password);
            assertTrue(document.isEncrypted());
        }
    }