use of com.adaptris.core.stubs.MockRequestReplyProducer in project interlok by adaptris.
the class RequestReplyProducerTest method testRequest_AdaptrisMessage_ProduceDestination.
@Test
public void testRequest_AdaptrisMessage_ProduceDestination() throws Exception {
MockRequestReplyProducer mock = createAndStart();
try {
AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage("dummy");
AdaptrisMessage reply = mock.request(msg);
assertSame(msg, reply);
assertTrue(msg.headersContainsKey(MockRequestReplyProducer.REPLY_METADATA_KEY));
} finally {
LifecycleHelper.stopAndClose(mock);
}
}
use of com.adaptris.core.stubs.MockRequestReplyProducer in project interlok by adaptris.
the class RequestReplyProducerTest method testRequest_AdaptrisMessage.
@Test
public void testRequest_AdaptrisMessage() throws Exception {
MockRequestReplyProducer mock = createAndStart();
try {
AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage("dummy");
AdaptrisMessage reply = mock.request(msg);
assertSame(msg, reply);
assertTrue(msg.headersContainsKey(MockRequestReplyProducer.REPLY_METADATA_KEY));
} finally {
LifecycleHelper.stopAndClose(mock);
}
}
use of com.adaptris.core.stubs.MockRequestReplyProducer in project interlok by adaptris.
the class RequestReplyProducerTest method testRequest_AdaptrisMessage_Long.
@Test
public void testRequest_AdaptrisMessage_Long() throws Exception {
MockRequestReplyProducer mock = createAndStart();
try {
AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage("dummy");
AdaptrisMessage reply = mock.request(msg, 10L);
assertSame(msg, reply);
assertTrue(msg.headersContainsKey(MockRequestReplyProducer.REPLY_METADATA_KEY));
} finally {
LifecycleHelper.stopAndClose(mock);
}
}
use of com.adaptris.core.stubs.MockRequestReplyProducer in project interlok by adaptris.
the class RequestReplyProducerTest method testProduce.
@Test
public void testProduce() throws Exception {
AdaptrisMessage msg = AdaptrisMessageFactory.getDefaultInstance().newMessage("dummy");
MockRequestReplyProducer mock = createAndStart();
try {
mock.produce(msg);
assertEquals(1, mock.getProducedMessages().size());
} finally {
LifecycleHelper.stopAndClose(mock);
}
}
Aggregations