use of com.adaptris.core.stubs.MockMessageConsumer in project interlok by adaptris.
the class PoolingWorkflowTest method testOnMessage_WithConsumeLocation_NoMatch.
@Test
public void testOnMessage_WithConsumeLocation_NoMatch() throws Exception {
MockChannel channel = createChannel();
PoolingWorkflow wf = (PoolingWorkflow) channel.getWorkflowList().get(0);
MockMessageProducer prod = (MockMessageProducer) wf.getProducer();
wf.setConsumer(new ConsumerWithLocation(getName()));
AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage();
try {
start(channel);
MockMessageConsumer m = (MockMessageConsumer) wf.getConsumer();
m.submitMessage(msg);
waitForMessages(prod, 1);
AdaptrisMessage consumed = prod.getMessages().get(0);
assertFalse(consumed.headersContainsKey(CoreConstants.MESSAGE_CONSUME_LOCATION));
} finally {
stop(channel);
}
}
Aggregations