@Test void up() throws Exception { doReturn(setFuture).when(client).set("__com.netflix.evcache.server.healthcheck", 300, "Greed is good!"); doReturn(true).when(setFuture).get(5, TimeUnit.SECONDS); doReturn(getFuture).when(client).asyncGet("__com.netflix.evcache.server.healthcheck"); doReturn("Greed is good!").when(getFuture).get(5, TimeUnit.SECONDS); indicator.doHealthCheck(builder); verify(builder).up(); }
@Override protected void doHealthCheck(final Health.Builder builder) throws Exception { if (isAvailableSetOperation() && isValidValue()) { builder.up(); } else { builder.outOfService(); } }
MemcachedHealthIndicator extends AbstractHealthIndicator { @Override protected void doHealthCheck(final Health.Builder builder) throws Exception { if (isAvailableSetOperation() && isValidValue()) { builder.up(); } else { builder.outOfService(); } } }
MemcachedHealthIndicator extends AbstractHealthIndicator { @Override protected void doHealthCheck(final Health.Builder builder) throws Exception { if (isAvailableSetOperation() && isValidValue()) { builder.up(); } else { builder.outOfService(); } } MemcachedHealthIndicator(final MemcachedClient client); }
MemcachedHealthIndicator extends AbstractHealthIndicator { @Override protected void doHealthCheck(final Health.Builder builder) throws Exception { if (isAvailableSetOperation() && isValidValue()) { builder.up(); } else { builder.outOfService(); } } MemcachedHealthIndicator(final MemcachedClient client);  }
MemcachedHealthIndicator extends AbstractHealthIndicator { @Override protected void doHealthCheck(final Health.Builder builder) throws Exception { if (isAvailableSetOperation() && isValidValue()) { builder.up(); } else { builder.outOfService(); } } MemcachedHealthIndicator(final MemcachedClient client);   }