use of com.adaptris.interlok.junit.scaffolding.jms.MockConsumer in project interlok by adaptris.
the class OnMessageHandlerTest method setUp.
@Before
public void setUp() throws Exception {
MockitoAnnotations.openMocks(this);
mockCorrelationSourceId = new MessageIdCorrelationIdSource();
mockListener = new MockMessageListener();
mockListener.setChannel(mockChannel);
mockTranslator = new TextMessageTranslator();
config = new MockConsumer();
config.setCurrentSession(mockSession);
messageProperties = Collections.emptyEnumeration();
when(jmsMessage.getPropertyNames()).thenReturn(messageProperties);
when(jmsMessage.getJMSMessageID()).thenReturn("id");
when(mockSession.getTransacted()).thenReturn(false);
when(mockChannel.isAvailable()).thenReturn(true);
when(mockChannel.getConsumeConnection()).thenReturn(mockConnection);
when(mockChannel.getProduceConnection()).thenReturn(mockConnection);
}
Aggregations