@Test public void testExtract() { RoundRobinRouter roundRobinRouter = new RoundRobinRouter(5); RoundRobinRouterDataExtractor extractor = RoundRobinRouterDataExtractor.INSTANCE; Map<String, String> extracted = extractor.extract(roundRobinRouter); Map<String, String> expected = Collections.singletonMap("Num of instances", String.valueOf(5)); assertEquals("extracted property maps", expected, extracted); }
public Map<String, String> extract(RouterConfig routerConfig) { RoundRobinRouter router = (RoundRobinRouter) routerConfig; return Collections.singletonMap("Num of instances", String.valueOf(router.nrOfInstances())); }
RoundRobinRouterDataExtractor implements RouterConfigDataExtractor { public Map<String, String> extract(RouterConfig routerConfig) { RoundRobinRouter router = (RoundRobinRouter) routerConfig; return Collections.singletonMap("Num of instances", String.valueOf(router.nrOfInstances())); } }
RoundRobinRouterDataExtractor implements RouterConfigDataExtractor { public Map<String, String> extract(RouterConfig routerConfig) { RoundRobinRouter router = (RoundRobinRouter) routerConfig; return Collections.singletonMap("Num of instances", String.valueOf(router.nrOfInstances())); } private  RoundRobinRouterDataExtractor(); }
RoundRobinRouterDataExtractor implements RouterConfigDataExtractor { public Map<String, String> extract(RouterConfig routerConfig) { RoundRobinRouter router = (RoundRobinRouter) routerConfig; return Collections.singletonMap("Num of instances", String.valueOf(router.nrOfInstances())); } private  RoundRobinRouterDataExtractor(); Map<String, String> extract(RouterConfig routerConfig); }
RoundRobinRouterDataExtractor implements RouterConfigDataExtractor { public Map<String, String> extract(RouterConfig routerConfig) { RoundRobinRouter router = (RoundRobinRouter) routerConfig; return Collections.singletonMap("Num of instances", String.valueOf(router.nrOfInstances())); } private  RoundRobinRouterDataExtractor(); Map<String, String> extract(RouterConfig routerConfig); static final RoundRobinRouterDataExtractor INSTANCE; }