use of org.apache.hc.client5.http.HttpResponseException in project pact-jvm by DiUS.
the class PactConsumer400Test method runTestAndHandleTheException.
@Test
@PactVerification("test_provider")
public void runTestAndHandleTheException() throws IOException {
try {
new ConsumerClient("http://localhost:" + rule.getPort()).getAsMap("/does-not-exist", "");
fail("Should have thrown an exception");
} catch (HttpResponseException e) {
// correct behaviour
}
}
Aggregations