    @Test
    public void shouldRequestAndAcceptSuccessfully() {

        final Transition requested = stateMachine.handleEvent(initialTransition, new RechargeEvent());
        assertThat(requested).isNotNull();
        assertThat(requested.getState().getClass()).isEqualTo(RECHARGE_REQUESTED_STATE.getClass());

        final Optional<PinRechargedContext> pinRechagedContext = requested.getContext().mostRecentOf(PinRechargedContext.class);
        assertThat(pinRechagedContext.isPresent()).isEqualTo(true);
        assertThat(onTransitionStack.size()).isEqualTo(0);

        final Transition accepted = stateMachine.handleEvent(requested, new RechargeAcceptedEvent());
        assertThat(accepted).isNotNull();
        assertThat(accepted.getState().getClass()).isEqualTo(RECHARGE_ACCEPTED_FINAL_STATE.getClass());
        assertThat(onTransitionStack.size()).isEqualTo(1);
        assertThat(onTransitionStack.get(0).getState().getClass()).isEqualTo(RechargeAcceptedFinalState.class);
        assertThat(onTransitionStack.get(0).previous().get().getState().getClass())
                .isEqualTo(RechargeRequestedState.class);
    }