public void testCreateConsumer() throws Exception {
  Message msg=super.createMessage();
  producer.send(msg);
synchronized (lock) {
    while (testConsumer == null) {
      lock.wait(3000);
    }
  }
  assertTrue(testConsumer != null);
}

public void testCreateConsumer ( ) throws Exception { Message msg = super . createMessage ( ) ; producer . send ( msg ) ; synchronized ( lock ) { while ( testConsumer == null ) { lock . wait ( 3000 ) ; } } assertTrue ( testConsumer != null ) ; }
tests if a consumer can be created asynchronusly
