use of httpstub.RequestAndResponse in project verify-hub by alphagov.
the class MatchingServiceRequestSenderTest method setUpClass.
@BeforeClass
public static void setUpClass() throws Exception {
JerseyClientConfiguration jerseyClientConfiguration = JerseyClientConfigurationBuilder.aJerseyClientConfiguration().withTimeout(Duration.seconds(10)).build();
client = new JerseyClientBuilder(samlSoapProxyAppRule.getEnvironment()).using(jerseyClientConfiguration).build(MatchingServiceRequestSenderTest.class.getSimpleName());
eventSinkStubRule.setupStubForLogging();
configStub.setupStubForCertificates(TEST_RP_MS);
String soap = createMsaResponse();
final String attibute_query_resource = "/attribute-query-request";
RequestAndResponse requestAndResponse = ExpectedRequestBuilder.expectRequest().withPath(attibute_query_resource).andWillRespondWith().withStatus(200).withBody(soap).withContentType(MediaType.TEXT_XML_TYPE.toString()).build();
msaStubRule.register(requestAndResponse);
}
Aggregations