public void testSendToWriterSoItCanBePolled() throws Exception {
FileUtil.deleteFile(new File("target/pollerFiles"));
// now lets make a request on this endpoint
DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
// lets send a request to be written to a file
// which should then be polled
for (int i = 0; i < NUMBER; i++) {
InOnly me = client.createInOnlyExchange();
me.setService(new QName("urn:test", "service"));
NormalizedMessage message = me.getInMessage();
message.setProperty(DefaultFileMarshaler.FILE_NAME_PROPERTY, "test" + i + ".xml");
message.setContent(new StringSource("<hello>world</hello>"));
client.sendSync(me);
}
Receiver receiver = (Receiver) getBean("receiver");
receiver.getMessageList().assertMessagesReceived(NUMBER);
}