messageHandler.shutdown();
messageDispatcher.shutdown();
  public void testShutdown() throws Exception {    final Monitor myMonitor = new Monitor();    final ConsoleListener listener = new ConsoleListener(myMonitor, m_logger);    final MessageHandler messageHandler = listener.getMessageHandler();    final WaitForNotification notified = new WaitForNotification(myMonitor);    messageHandler.shutdown();    assertTrue(notified.wasNotified());    m_loggerFactory.assertSuccess("output",                                  new Class[] { String.class, Integer.class });    m_loggerFactory.assertNoMoreCalls();    assertFalse(listener.checkForMessage(ConsoleListener.ANY ^                                          ConsoleListener.SHUTDOWN));    assertTrue(listener.checkForMessage(ConsoleListener.SHUTDOWN));  }