@Override
 protected void tearDown() throws Exception {
   super.tearDown();
   master.stop();
   master.waitUntilStopped();
   slaveStarted.await(60, TimeUnit.SECONDS);
   BrokerService brokerService = slave.get();
   if (brokerService != null) {
     brokerService.stop();
   }
   master.stop();
 }
 @Override
 protected void setUp() throws Exception {
   setMaxTestTime(TimeUnit.MINUTES.toMillis(10));
   setAutoFail(true);
   if (System.getProperty("basedir") == null) {
     File file = new File(".");
     System.setProperty("basedir", file.getAbsolutePath());
   }
   super.messageCount = 500;
   failureCount = super.messageCount / 2;
   super.topic = isTopic();
   createMaster();
   createSlave();
   // wait for thing to connect
   Thread.sleep(1000);
   super.setUp();
 }