private final Semaphore ready = new Semaphore (0);
@Test
public void mockTopicTest () throws JMSException
{
ConnectionFactory factory = new InMemoryBusConnectionFactory ();
Connection connection = factory.createConnection ();
Session session = connection.createSession (false, Session.AUTO_ACKNOWLEDGE);
MessageProducer producer = session.createProducer (session.createTopic ("test"));
final MessageConsumer consumer = session.createConsumer (session.createTopic ("test"));
consumer.setMessageListener (new MessageListener ()
{