SettableHealthChecker extends AbstractListenable<HealthChecker> implements ListenableHealthChecker { public SettableHealthChecker setHealthy(boolean isHealthy) { final boolean oldValue = this.isHealthy.getAndSet(isHealthy); if (oldValue != isHealthy) { notifyListeners(this); } return this; } SettableHealthChecker();  SettableHealthChecker(boolean isHealthy); @Override boolean isHealthy(); SettableHealthChecker setHealthy(boolean isHealthy); @Override String toString();  }
@Test public void setHealthy() { final SettableHealthChecker checker = new SettableHealthChecker(); checker.setHealthy(true); assertTrue(checker.isHealthy()); }