SlobrokMonitor implements AutoCloseable { void updateSlobrokList(ApplicationInfo application) { List<String> slobrokSpecs = getSlobrokSpecs(application); slobrokList.setup(slobrokSpecs.toArray(new String[0])); } SlobrokMonitor();   SlobrokMonitor(SlobrokList slobrokList, Mirror mirror); private  SlobrokMonitor(SlobrokList slobrokList); @Override void close(); static final String SLOBROK_SERVICE_TYPE; static final String SLOBROK_RPC_PORT_TAG; }
@Test public void testUpdateSlobrokList() { ApplicationInfo applicationInfo = ExampleModel.createApplication( "tenant", "application-name") .build(); }
@Test public void testUpdateSlobrokList2() { final String hostname = "hostname"; final int port = 1; SuperModel superModel = ExampleModel.createExampleSuperModelWithOneRpcPort(hostname, port); slobrokMonitor.updateSlobrokList(superModel.getApplicationInfo(ExampleModel.APPLICATION_ID).get()); String[] expectedSpecs = new String[] {"tcp/" + hostname + ":" + port}; verify(slobrokList).setup(expectedSpecs); }