use of uk.gov.ida.hub.policy.contracts.AuthnResponseFromHubContainerDto in project verify-hub by alphagov.
the class RpErrorResponseFromHubIntegrationTest method shouldGenerateAnErrorAuthnResponseFromHub.
@Test
public void shouldGenerateAnErrorAuthnResponseFromHub() throws Exception {
final SessionId sessionId = aSessionIsCreated();
SamlMessageDto samlMessageDto = new SamlMessageDto("saml");
samlEngineStub.setUpStubForErrorResponseGenerate(samlMessageDto);
URI uri = UriBuilder.fromPath(Urls.PolicyUrls.RP_ERROR_RESPONSE_RESOURCE).build(sessionId.getSessionId());
Response response = get(uri);
assertThat(response.getStatus()).isEqualTo(Response.Status.OK.getStatusCode());
AuthnResponseFromHubContainerDto authnResponseFromHubContainerDto = response.readEntity(AuthnResponseFromHubContainerDto.class);
assertThat(authnResponseFromHubContainerDto.getSamlResponse()).isEqualTo(samlMessageDto.getSamlMessage());
}
Aggregations