MqttSpyDaemon extends BaseDaemon { public boolean canPublish() { return mqttConnection.canPublish(); }  void initialise(); void loadAndRun(final String configurationFile); boolean canPublish(); MqttScriptIO more();  }
@Test public void testSslWithMosquittoConfiguration() { final MqttSpyDaemon daemon = new MqttSpyDaemon(); assertTrue(daemon.start("src/test/resources/test_configurations/mosquitto-org.xml")); while (!daemon.canPublish()) { logger.debug("Client not connected yet - can't start test cases... [waiting another 1000ms]"); ThreadingUtils.sleep(1000); } final TestCaseResult result = daemon.runTestCase("src/test/resources/test_cases/test3/tc3.js"); assertTrue(result.getResult().equals(TestCaseStatus.PASSED)); assertTrue(result.getStepResults().size() >= 3); logger.info("Steps = " + result.getStepResults().stream() .map(Object::toString) .collect(Collectors.joining(", "))); daemon.stop(); }