@Test
public void testProcess() throws InterruptedException, LifecycleException,
EventDeliveryException {
Channel channel = new PseudoTxnMemoryChannel();
Context context = new Context();
context.put("logicalNode.name", "test");
Configurables.configure(source, context);
Configurables.configure(channel, context);
source.setChannel(channel);
for (long i = 0; i < 100; i++) {
source.process();
Event event = channel.take();
Assert.assertArrayEquals(String.valueOf(i).getBytes(),
new String(event.getBody()).getBytes());
}
}