super.setUp();
}
public void testFileConsumeDoneFileIssue() throws Exception {
NotifyBuilder notify = new NotifyBuilder(context).whenDone(5).create();
template.sendBodyAndHeader("file:target/done", "A", Exchange.FILE_NAME, "foo-a.txt");
template.sendBodyAndHeader("file:target/done", "B", Exchange.FILE_NAME, "foo-b.txt");
template.sendBodyAndHeader("file:target/done", "C", Exchange.FILE_NAME, "foo-c.txt");
template.sendBodyAndHeader("file:target/done", "D", Exchange.FILE_NAME, "foo-d.txt");
template.sendBodyAndHeader("file:target/done", "E", Exchange.FILE_NAME, "foo-e.txt");
template.sendBodyAndHeader("file:target/done", "E", Exchange.FILE_NAME, "foo.done");
assertTrue("Done file should exists", new File("target/done/foo.done").exists());
getMockEndpoint("mock:result").expectedBodiesReceivedInAnyOrder("A", "B", "C", "D", "E");
context.startRoute("foo");
assertMockEndpointsSatisfied();
assertTrue(notify.matchesMockWaitTime());
Thread.sleep(250);
// the done file should be deleted
assertFalse("Done file should be deleted", new File("target/done/foo.done").exists());