public void testValidFilenameOnExchange() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMessageCount(2);
// should have file name header set
mock.allMessages().header(Exchange.FILE_NAME).isNotNull();
assertMockEndpointsSatisfied();
// and expect name to contain target/filename-consumer-XXX.txt
assertDirectoryEquals("target/filename-consumer-bye.txt", mock.getReceivedExchanges().get(0).getIn().getHeader(Exchange.FILE_NAME, String.class));