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

        String defaultOutputFormat = "pdf";
        Endpoint endpoint = context().getEndpoint("fop:" + defaultOutputFormat);
        Producer producer = endpoint.createProducer();
        Exchange exchange = new DefaultExchange(context);
        exchange.getIn().setHeader(FopConstants.CAMEL_FOP_OUTPUT_FORMAT, "txt");
        exchange.getIn().setBody(FopHelper.decorateTextWithXSLFO("Test Content"));

        producer.process(exchange);
        String plainText = exchange.getMessage().getBody(String.class).trim();
        assertEquals("Test Content", plainText);
    }