public class CamelSourceAdapterTest extends CamelSpringTestSupport {
@Test
public void testSendingOneWayMessage() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
DirectChannel channelA = getMandatoryBean(DirectChannel.class, "channelA");
channelA.subscribe(new MessageHandler() {
public void handleMessage(Message<?> message) {
latch.countDown();
assertEquals("We should get the message from channelA", message.getPayload(), "Willem");
}
});