/**
* Test that the circuit-breaker will 'trip' and prevent command execution on subsequent calls.
*/
@Test
public void testCircuitBreakerTripsAfterFailures() {
TestCircuitBreaker circuitBreaker = new TestCircuitBreaker();
/* fail 3 times and then it should trip the circuit and stop executing */
// failure 1
KnownFailureTestCommandWithFallback attempt1 = new KnownFailureTestCommandWithFallback(circuitBreaker);
attempt1.execute();
assertTrue(attempt1.isResponseFromFallback());