public void process(final Exchange exchange) {
        final ExecutionContext executionContext = smooks.createExecutionContext();
        try {
            executionContext.put(EXCHANGE_TYPED_KEY, exchange);
            String charsetName = (String) exchange.getProperty(Exchange.CHARSET_NAME);
            if (charsetName != null) {
                // if provided use the came character encoding
                executionContext.setContentEncoding(charsetName);
            }
            exchange.getIn().setHeader(SMOOKS_EXECUTION_CONTEXT, executionContext);
            setupSmooksReporting(executionContext);

            final Exports exports = smooks.getApplicationContext().getRegistry().lookup(new ExportsLookup());
            if (exports.hasExports()) {
                final Result[] results = exports.createResults();
                smooks.filterSource(executionContext, getSource(exchange), results);
                setResultOnBody(exports, results, exchange);
            } else {
                smooks.filterSource(executionContext, getSource(exchange));
            }
        } finally {
            executionContext.remove(EXCHANGE_TYPED_KEY);
        }
    }
@Test
    public void testProcessGivenFileWhenSmooksExportIsStringResult() throws Exception {
        deleteDirectory("target/smooks");
        context.addRoutes(new RouteBuilder() {
            public void configure() {
                from("file://target/smooks")
                        .process(new SmooksProcessor(new Smooks().setExports(new Exports(StringResult.class)), context))
                        .to("mock:a");
            }
        });
        context.start();
        template.sendBody("file://target/smooks", "<blah />");

        MockEndpoint mockEndpoint = getMockEndpoint("mock:a");
        mockEndpoint.expectedMessageCount(1);

        assertIsSatisfied(mockEndpoint);

        assertEquals("<blah/>", mockEndpoint.getExchanges().get(0).getIn().getBody(String.class));
    }