INT-1743 polished test

This commit is contained in:
Oleg Zhurakousky
2011-01-13 13:31:19 -05:00
parent 04e2c47b23
commit 6d9335e897

View File

@@ -40,13 +40,14 @@ public class JmsChannelHistoryTests {
@Test
public void testMessageHistory() throws Exception{
ActiveMqTestUtils.prepare();
ApplicationContext ac = new ClassPathXmlApplicationContext("JmsChannelHistory-context.xml", this.getClass());
ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("JmsChannelHistory-context.xml", this.getClass());
SubscribableJmsChannel jmsChannel = ac.getBean("jmsChannel", SubscribableJmsChannel.class);
JmsService service = ac.getBean("subscriber", JmsService.class);
jmsChannel.send(new GenericMessage<String>("hello"));
Thread.sleep(5000);
verify(service, times(1)).handleMessage(Mockito.any(Message.class));
ac.destroy();
}
public static interface JmsGateway{