public void recordFailure() {
numOfFailures.incrementAndGet();
}
@Override
public void recordSuccess() {
<BUG>stateMachine.resetState(this);
}</BUG>
@Override
public CircuitBreaker.State getState() {
return CircuitBreaker.State.OPEN;

public void recordFailure() {
numOfFailures.incrementAndGet();
}
@Override
public void recordSuccess() {
stateMachine.resetState(CircuitBreaker.StateTransition.OPEN_TO_CLOSED);
}
@Override
public CircuitBreaker.State getState() {
return CircuitBreaker.State.OPEN;
