@Test public void testConnected() throws Exception { CuratorFramework curator = mock(CuratorFramework.class, RETURNS_DEEP_STUBS); when(curator.getZookeeperClient().isConnected()).thenReturn(true); CuratorHealthCheck healthCheck = new CuratorHealthCheck(curator); assertTrue(healthCheck.check().isHealthy()); }
@Override protected Result check() throws Exception { boolean connected = _curator.getZookeeperClient().isConnected(); String description = String.format("Connect String: %s, Connected: %s", _curator.getZookeeperClient().getCurrentConnectionString(), connected); return connected ? Result.healthy(description) : Result.unhealthy(description); }
CuratorHealthCheck extends HealthCheck { @Override protected Result check() throws Exception { boolean connected = _curator.getZookeeperClient().isConnected(); String description = String.format("Connect String: %s, Connected: %s", _curator.getZookeeperClient().getCurrentConnectionString(), connected); return connected ? Result.healthy(description) : Result.unhealthy(description); } }
CuratorHealthCheck extends HealthCheck { @Override protected Result check() throws Exception { boolean connected = _curator.getZookeeperClient().isConnected(); String description = String.format("Connect String: %s, Connected: %s", _curator.getZookeeperClient().getCurrentConnectionString(), connected); return connected ? Result.healthy(description) : Result.unhealthy(description); } CuratorHealthCheck(CuratorFramework curator); }
CuratorHealthCheck extends HealthCheck { @Override protected Result check() throws Exception { boolean connected = _curator.getZookeeperClient().isConnected(); String description = String.format("Connect String: %s, Connected: %s", _curator.getZookeeperClient().getCurrentConnectionString(), connected); return connected ? Result.healthy(description) : Result.unhealthy(description); } CuratorHealthCheck(CuratorFramework curator);  }
CuratorHealthCheck extends HealthCheck { @Override protected Result check() throws Exception { boolean connected = _curator.getZookeeperClient().isConnected(); String description = String.format("Connect String: %s, Connected: %s", _curator.getZookeeperClient().getCurrentConnectionString(), connected); return connected ? Result.healthy(description) : Result.unhealthy(description); } CuratorHealthCheck(CuratorFramework curator);   }