use of uk.gov.ida.hub.policy.domain.IdpSelected in project verify-hub by alphagov.
the class SessionTimeoutIntegrationTests method selectIdpShouldReturnErrorWhenSessionDoesNotExistInPolicy.
@Test
public void selectIdpShouldReturnErrorWhenSessionDoesNotExistInPolicy() {
final ByteArrayOutputStream outContent = new ByteArrayOutputStream();
System.setOut(new PrintStream(outContent));
SessionId sessionId = SessionId.createNewSessionId();
URI uri = UriBuilder.fromPath(Urls.PolicyUrls.AUTHN_REQUEST_SELECT_IDP_RESOURCE).buildFromEncoded(sessionId);
confirmError(policy.uri(uri.getPath()), new IdpSelected(STUB_IDP_ONE, "some-ip-address", REGISTERING, REQUESTED_LOA), ExceptionType.SESSION_NOT_FOUND);
assertThatEventEmitterWritesToStandardOutput(outContent);
System.setOut(System.out);
}
Aggregations