}
@Test
public void testRendportIncident() throws Exception {
// assert mailbox is empty before starting
Mailbox inbox = Mailbox.get("incident@localhost");
inbox.clear();
assertEquals("Should not have mails", 0, inbox.size());
// create input parameter
InputReportIncident input = new InputReportIncident();
input.setIncidentId("222");
input.setIncidentDate("2010-07-14");
input.setGivenName("Charles");
input.setFamilyName("Moulliard");
input.setSummary("Bla");
input.setDetails("Bla bla");
input.setEmail("cmoulliard@apache.org");
input.setPhone("0011 22 33 44");
// create the webservice client and send the request
ReportIncidentEndpoint client = createCXFClient();
OutputReportIncident out = client.reportIncident(input);
// assert we got a OK back
assertEquals("0", out.getCode());
// let some time pass to allow Camel to pickup the file and send it as an email
Thread.sleep(3000);
// assert mail box
assertEquals("Should have got 1 mail", 1, inbox.size());
}