protected String componentName = "activemq";
@Test
public void testRouteFileToFile() throws Exception {
deleteDirectory("target/file2file");
NotifyBuilder notify = new NotifyBuilder(context).from("activemq:queue:hello").whenDone(1).create();
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMessageCount(1);
template.sendBodyAndHeader("file://target/file2file/in", "Hello World", Exchange.FILE_NAME, "hello.txt");
assertMockEndpointsSatisfied();
notify.matchesMockWaitTime();
File file = new File("./target/file2file/out/hello.txt");
file = file.getAbsoluteFile();
assertTrue("The file should exists", file.exists());
}