DefaultProxyEndpointHealthChecker implements ProxyEndpointHealthChecker { @Override public boolean checkConnectivity(ProxyEndpoint endpoint) { try { if (!endpoint.isProxyProtocolSupported()) { return true; } if(!allHealthStatus.containsKey(endpoint)) { allHealthStatus.put(endpoint, new EndpointHealthStatus(endpoint)); } return allHealthStatus.get(endpoint).isHealthy(); } catch (Exception e) { logger.error("[checkConnectivity]", e); } return false; } DefaultProxyEndpointHealthChecker(ScheduledExecutorService scheduled); @Override boolean checkConnectivity(ProxyEndpoint endpoint);  }
@Test public void testCheckConnectivity() { boolean status = checker.checkConnectivity(endpoint); Assert.assertTrue(status); Assert.assertTrue(checker.getAllHealthStatus().containsKey(endpoint)); }