DefaultRedisHealthCheckInstance extends AbstractLifecycle implements RedisHealthCheckInstance { @Override protected void doStop() throws Exception { for(HealthCheckAction action : actions) { try { LifecycleHelper.stopIfPossible(action); } catch (Exception e) { logger.error("[stop] {}", this.toString(), e); } } actions.clear(); super.doStop(); }  DefaultRedisHealthCheckInstance setRedisInstanceInfo(RedisInstanceInfo redisInstanceInfo); DefaultRedisHealthCheckInstance setHealthCheckConfig(HealthCheckConfig healthCheckConfig); DefaultRedisHealthCheckInstance setEndpoint(Endpoint endpoint); DefaultRedisHealthCheckInstance setSession(RedisSession session); @Override RedisInstanceInfo getRedisInstanceInfo(); @Override HealthCheckConfig getHealthCheckConfig(); @Override Endpoint getEndpoint(); @Override RedisSession getRedisSession(); @Override void register(HealthCheckAction action); @Override void unregister(HealthCheckAction action); @Override List<HealthCheckAction> getHealthCheckActions(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); HealthCheckActionListener createPingListener(); HealthCheckActionListener createDelayListener();  }
@Test public void testDoStop() throws Exception { RedisHealthCheckInstance instance = factory.create(newRandomFakeRedisMeta()); for(HealthCheckAction action : instance.getHealthCheckActions()) { logger.info("[action] {}", action); for(Object listener : ((AbstractHealthCheckAction) action).getListeners()) { logger.info(" [listener] {}", listener); } } instance.stop(); }