@Test public void testFtpSimpleConsumeAbsolute() throws Exception { if (!canTest()) { return; } String expected = "Hello World"; // create file using regular file // FTP Server does not support absolute path, so lets simulate it String path = FTP_ROOT_DIR + "/tmp/mytemp"; template.sendBodyAndHeader("file:" + path, expected, Exchange.FILE_NAME, "hello.txt"); MockEndpoint mock = getMockEndpoint("mock:result"); mock.expectedMessageCount(1); mock.expectedHeaderReceived(Exchange.FILE_NAME, "hello.txt"); context.startRoute("foo"); assertMockEndpointsSatisfied(); GenericFile<?> remoteFile = (GenericFile<?>) mock.getExchanges().get(0).getIn().getBody(); assertTrue(remoteFile.getBody() instanceof InputStream); }