@Override
 protected void setUp() throws Exception {
   super.setUp();
   server = new HornetQTaskServer(taskService, 5153);
   System.out.println("Waiting for the HornetQTask Server to come up");
   try {
     startTaskServerThread(server, false);
   } catch (Exception e) {
     startTaskServerThread(server, true);
   }
   AsyncHornetQHTWorkItemHandler handler = new AsyncHornetQHTWorkItemHandler(ksession);
   setClient(handler.getClient());
   setHandler(handler);
 }
 protected void tearDown() throws Exception {
   ((AsyncHornetQHTWorkItemHandler) getHandler()).dispose();
   getClient().disconnect();
   server.stop();
   super.tearDown();
 }