package endtoend;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.zeromq.ZMQ;


/**
 *
 */
public class VismoEndToEndTest {
    /***/
    private final FakeVisionCluster cluster    = new FakeVisionCluster();
    /***/
    private final MonitoringDriver  monitoring = new MonitoringDriver();


    /**
     * @throws Exception
     */
    @Test
    public void monitoringConnectsAndSendsMessagesToCluster() throws Exception {
        cluster.start();
        monitoring.start();
        cluster.receivesNewJoin();
        monitoring.reportsStatus();
        cluster.receivesEvents();
        monitoring.leaveCluster();
    }


    /**
     * 
     */
    @Before
    public void setUp() {
        System.out.println(ZMQ.getVersionString());
    }


    /**
     * 
     */
    @After
    public void tearDown() {
        cluster.shutDown();
    }
}

@@ -57,60 +57,12 @@
 nit.
-Before;%0Aimport org.junit.Test;%0Aimport org.zeromq.ZMQ
+Test
 ;%0A%0A%0A
@@ -587,143 +587,57 @@
 ing.
-leaveCluster();%0A    %7D%0A%0A%0A    /**%0A     * %0A     */%0A    @Before%0A    public void setUp() %7B%0A        System.out.println(ZMQ.getVersionString()
+reportsStatus();%0A        monitoring.leaveCluster(
 );%0A 

make sure monitoring keeps reporting the status