MemoryHealthIndicator implements HealthIndicator { public double getThreshold() { return threshold; } MemoryHealthIndicator(double threshold); double getThreshold(); @Override Health health();  }
@Test public void shouldUseThresholdPassedInThroughConstructor() { final MemoryHealthIndicator sutHealthIndicaor = new MemoryHealthIndicator(0.5); final double actual = sutHealthIndicaor.getThreshold(); Assertions.assertThat(actual).isEqualTo(0.5, Offset.offset(0.001)); }