@Test public void testOpenAfter2Failures() { LOGGER.info("Test: expect status is OPEN after two consecutive failures"); this.markTwoFailures(); assertThat(this.circuitBreaker.isClosed()).withFailMessage("Status should be OPEN after 2 failures").isFalse(); }
public boolean isClosed() { final Status currentStatus = this.updateAndGetStatus(); return currentStatus != Status.OPEN; }
CircuitBreaker { public boolean isClosed() { final Status currentStatus = this.updateAndGetStatus(); return currentStatus != Status.OPEN; } }
CircuitBreaker { public boolean isClosed() { final Status currentStatus = this.updateAndGetStatus(); return currentStatus != Status.OPEN; } private  CircuitBreaker(final Builder builder); }
CircuitBreaker { public boolean isClosed() { final Status currentStatus = this.updateAndGetStatus(); return currentStatus != Status.OPEN; } private  CircuitBreaker(final Builder builder); void openCircuit(); void closeCircuit(); boolean isClosed(); void markSuccess(); void markFailure(); }
CircuitBreaker { public boolean isClosed() { final Status currentStatus = this.updateAndGetStatus(); return currentStatus != Status.OPEN; } private  CircuitBreaker(final Builder builder); void openCircuit(); void closeCircuit(); boolean isClosed(); void markSuccess(); void markFailure();  }