deleteDirectory("./target/deletefile");
super.setUp();
}
public void testPollFileAndShouldBeDeletedAtThirdPoll() throws Exception {
NotifyBuilder notify = new NotifyBuilder(context).whenDone(3).create();
template.sendBodyAndHeader("file://target/deletefile", body, Exchange.FILE_NAME, "hello.txt");
getMockEndpoint("mock:result").expectedBodiesReceived(body);
// 2 first attempt should fail
getMockEndpoint("mock:error").expectedMessageCount(2);
assertMockEndpointsSatisfied();
notify.matchesMockWaitTime();
assertEquals(3, counter);
// assert the file is deleted
File file = new File("./target/deletefile/hello.txt");