use of uk.gov.ida.hub.policy.domain.state.FraudEventDetectedState in project verify-hub by alphagov.
the class ErrorStateControllerTests method shouldReturnErrorResponseWhenAskedAndInFraudEventDetectedState.
@Test
public void shouldReturnErrorResponseWhenAskedAndInFraudEventDetectedState() {
FraudEventDetectedState state = FraudEventDetectedStateBuilder.aFraudEventDetectedState().build();
StateController stateController = new FraudEventDetectedStateController(state, responseFromHubFactory, stateTransitionAction, null, null, null);
when(sessionRepository.getStateController(sessionId, ErrorResponsePreparedState.class)).thenReturn(stateController);
ResponseFromHub responseFromHub = authnRequestFromTransactionHandler.getErrorResponseFromHub(sessionId);
assertThat(responseFromHub.getStatus()).isEqualTo(TransactionIdaStatus.NoAuthenticationContext);
}
Aggregations