@@ -0,0 +1,1753 @@
+package ch.trivadis.com;%0A%0Aimport io.vertx.test.core.VertxTestBase;%0Aimport org.eclipse.paho.client.mqttv3.*;%0Aimport org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;%0Aimport org.junit.Test;%0A%0Aimport java.util.concurrent.CountDownLatch;%0A%0A/**%0A * This Test works only with a valid MQTT server!%0A * Created by Andy Moncsek on 20.04.15.%0A */%0Apublic class UltrasonicSensorMQTTServiceTestGlobal extends VertxTestBase %7B%0A    private MqttClient client;%0A%0A    @Override%0A    public void setUp() throws Exception %7B%0A        super.setUp();%0A%0A        connect();%0A    %7D%0A%0A    private void connect() %7B%0A        try %7B%0A            client = new MqttClient(%22tcp://test.mosquitto.org:1883%22, MqttClient.generateClientId(), new MemoryPersistence());%0A            client.connect();%0A            client.subscribe(%22ultrasonicSensor%22, 0);%0A        %7D catch (MqttException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A%0A    @Test%0A    public void simpleConnectionTest() throws InterruptedException %7B%0A        CountDownLatch latch = new CountDownLatch(100);%0A        client.setCallback(new MyMQQTClient(latch));%0A%0A       latch.await();%0A        testComplete();%0A    %7D%0A%0A    public class MyMQQTClient implements MqttCallback %7B%0A        private final CountDownLatch latch;%0A%0A        public MyMQQTClient(CountDownLatch latch) %7B%0A            this.latch = latch;%0A        %7D%0A%0A        @Override%0A        public void connectionLost(Throwable cause) %7B%0A%0A        %7D%0A%0A        @Override%0A        public void messageArrived(String topic, MqttMessage message) throws Exception %7B%0A            System.out.println(new String(message.getPayload()));%0A            if (latch != null) latch.countDown();%0A        %7D%0A%0A        @Override%0A        public void deliveryComplete(IMqttDeliveryToken token) %7B%0A%0A        %7D%0A    %7D%0A%0A%0A%7D%0A

add simple test