final TenacityCircuitBreakersResource resource =
new TenacityCircuitBreakersResource(ImmutableList.<TenacityPropertyKey>of(DependencyKey.NON_EXISTENT_HEALTHCHECK, DependencyKey.EXISTENT_HEALTHCHECK));
new TenacitySuccessCommand(DependencyKey.EXISTENT_HEALTHCHECK).execute();
assertThat(resource.circuitBreakers())
.isEqualTo(ImmutableList.of(CircuitBreaker.closed(DependencyKey.EXISTENT_HEALTHCHECK)));
}
private static void tryToOpenCircuitBreaker(TenacityPropertyKey key) {
for (int i = 0; i < 100; i++) {