@Test public void assertIsNotAvailableServerWhenDisabled() { when(jobNodeStorage.getJobNodeData("servers/127.0.0.1")).thenReturn(ServerStatus.DISABLED.name()); assertFalse(serverService.isAvailableServer("127.0.0.1")); }
public boolean isAvailableServer(final String ip) { return isEnableServer(ip) && hasOnlineInstances(ip); }
ServerService { public boolean isAvailableServer(final String ip) { return isEnableServer(ip) && hasOnlineInstances(ip); } }
ServerService { public boolean isAvailableServer(final String ip) { return isEnableServer(ip) && hasOnlineInstances(ip); } ServerService(final CoordinatorRegistryCenter regCenter, final String jobName); }
ServerService { public boolean isAvailableServer(final String ip) { return isEnableServer(ip) && hasOnlineInstances(ip); } ServerService(final CoordinatorRegistryCenter regCenter, final String jobName); void persistOnline(final boolean enabled); boolean hasAvailableServers(); boolean isAvailableServer(final String ip); boolean isEnableServer(final String ip); }
ServerService { public boolean isAvailableServer(final String ip) { return isEnableServer(ip) && hasOnlineInstances(ip); } ServerService(final CoordinatorRegistryCenter regCenter, final String jobName); void persistOnline(final boolean enabled); boolean hasAvailableServers(); boolean isAvailableServer(final String ip); boolean isEnableServer(final String ip);  }