folder.close(true);
}
protected RouteBuilder createRouteBuilder() throws Exception {
// Two tests also in conjunction with search since mail consumer does sort and search together
return new RouteBuilder() {
public void configure() throws Exception {
from("pop3://bill@localhost?password=secret&searchTerm=#searchTerm&sortTerm=#sortAscendingDate").to("mock:resultAscending");
from("pop3://bill@localhost?password=secret&sortTerm=#sortDescendingDate").to("mock:resultDescending");
from("imap://bill@localhost?password=secret&sortTerm=#sortDescendingDate").to("mock:resultDescendingImap");
}