### Question:
ClusterStarter { public void deployVerticles(AbstractVerticle... verticles) throws Exception { DeploymentOptions deploymentOptions = this.getDeployMentOptions(true); if (vertx == null) { this.clusteredVertx(resultHandler -> { vertx = resultHandler.result(); if (vertx == null) { ErrorHandler.getInstance().handle(new RuntimeException( "vertx not available resultHandler result is null")); } this.deployVerticles(deploymentOptions, verticles); }); } else { this.deployVerticles(deploymentOptions, verticles); } }  Vertx getVertx(); void prepare(); void configureCluster(String clusterHostname,String publicHost); void clusteredVertx(Handler<AsyncResult<Vertx>> resultHandler); DeploymentOptions getDeployMentOptions(boolean worker); void deployVerticles(AbstractVerticle... verticles); VertxOptions getOptions(); void undeployVerticle(DukesVerticle verticle); String getHostname(); void setHostname(String hostname); static final int MAX_START_TIME; }### Answer:
@Test public void testClusterStarter() throws Exception { Environment.mock(); ClusterStarter starter = new ClusterStarter(); TestVerticle testVerticle = new TestVerticle(); starter.deployVerticles(testVerticle); testVerticle.waitStatus(Status.started, ClusterStarter.MAX_START_TIME, 10); int minLoops=5; while (testVerticle.counter <=minLoops) { Thread.sleep(TestVerticle.TEST_INTERVAL_MS); } }