@DataProvider(value = {

    "CLOSED |   0",
    "CLOSED |   1",
    "CLOSED |   9999999",
    "OPEN   |   0",
    "OPEN   |   1",
    "OPEN   |   999999",
}, splitBy = "\\|")
@Test
public void processSuccessfulCall_resets_consecutive_failure_counter_to_0_and_sets_state_to_CLOSED(
    State stateBeforeCall, int failureCountBeforeCall) {
    // given
    cbSpy.currentState = stateBeforeCall;
    cbSpy.consecutiveFailureCount = failureCountBeforeCall;
    // when
    cbSpy.processSuccessfulCall();
    // then
    assertThat(cbSpy.consecutiveFailureCount).isEqualTo(0);
    assertThat(cbSpy.currentState).isEqualTo(State.CLOSED);
}