use of uk.gov.ida.hub.policy.proxy.IdentityProvidersConfigProxy in project verify-hub by alphagov.
the class Cycle0And1MatchRequestSentStateControllerTest method responseProcessingDetails_shouldReturnCompleteStatus_successResponseSentFromMatchingService.
@Test
public void responseProcessingDetails_shouldReturnCompleteStatus_successResponseSentFromMatchingService() {
ArgumentCaptor<SuccessfulMatchState> argumentCaptor = ArgumentCaptor.forClass(SuccessfulMatchState.class);
MatchFromMatchingService matchFromMatchingService = new MatchFromMatchingService(MATCHING_SERVICE_ENTITY_ID, REQUEST_ID, "assertionBlob", Optional.of(LevelOfAssurance.LEVEL_1));
controller.handleMatchResponseFromMatchingService(matchFromMatchingService);
IdentityProvidersConfigProxy identityProvidersConfigProxy = mock(IdentityProvidersConfigProxy.class);
verify(stateTransitionAction, times(1)).transitionTo(argumentCaptor.capture());
SuccessfulMatchStateController successfulMatchStateController = new SuccessfulMatchStateController(argumentCaptor.getValue(), responseFromHubFactory, identityProvidersConfigProxy);
final ResponseProcessingDetails responseProcessingDetails = successfulMatchStateController.getResponseProcessingDetails();
assertThat(responseProcessingDetails.getResponseProcessingStatus()).isEqualTo(ResponseProcessingStatus.SEND_SUCCESSFUL_MATCH_RESPONSE_TO_TRANSACTION);
assertThat(responseProcessingDetails.getSessionId()).isEqualTo(state.getSessionId());
}
Aggregations