@Test public void testMasterConfigAPI() throws InterruptedException { final CountDownLatch latch = new CountDownLatch(1); final CompletionStage<HttpResponse> responseFuture = http.singleRequest( HttpRequest.GET(masterEndpoint("masterconfig"))); responseFuture .thenCompose(r -> processRespFut(r, Optional.of(200))) .whenComplete((msg, t) -> { try { String responseMessage = getResponseMessage(msg, t); logger.info("got response {}", responseMessage); List<MasterDescriptionRoute.Configlet> masterconfig = Jackson.fromJSON(responseMessage, new TypeReference<List<MasterDescriptionRoute.Configlet>>() {}); logger.info("master config ---> {}", masterconfig); assertEquals(masterDescRoute.getConfigs(), masterconfig); } catch (Exception e) { fail("unexpected error "+ e.getMessage()); } latch.countDown(); }); assertTrue(latch.await(2, TimeUnit.SECONDS)); }
public List<Configlet> getConfigs() { return configs; }
MasterDescriptionRoute extends BaseRoute { public List<Configlet> getConfigs() { return configs; } }
MasterDescriptionRoute extends BaseRoute { public List<Configlet> getConfigs() { return configs; } MasterDescriptionRoute(final MasterDescription masterDescription); }
MasterDescriptionRoute extends BaseRoute { public List<Configlet> getConfigs() { return configs; } MasterDescriptionRoute(final MasterDescription masterDescription); List<Configlet> getConfigs(); Route createRoute(Function<Route, Route> routeFilter); }
MasterDescriptionRoute extends BaseRoute { public List<Configlet> getConfigs() { return configs; } MasterDescriptionRoute(final MasterDescription masterDescription); List<Configlet> getConfigs(); Route createRoute(Function<Route, Route> routeFilter);  }