/** * Adds an expectation on the ClientDriver to expect the given request and response. * * @param request The request to expect * @param response The response to expect * * @return The newly added expectation. */ public ClientDriverExpectation addExpectation(ClientDriverRequest request, ClientDriverResponse response) { LOGGER.info("addExpectation: {} {}", request.getMethod(), request.getPath()); if (!response.canExpire() && (expectedResponseTimeout > 0)) { response.within(expectedResponseTimeout, TimeUnit.MILLISECONDS); } return clientDriver.addExpectation(request, response); }
/** * Adds an expectation on the ClientDriver to expect the given request and response. * * @param request The request to expect * @param response The response to expect * * @return The newly added expectation. */ public ClientDriverExpectation addExpectation(ClientDriverRequest request, ClientDriverResponse response) { LOGGER.info("addExpectation: {} {}", request.getMethod(), request.getPath()); if (!response.canExpire() && (expectedResponseTimeout > 0)) { response.within(expectedResponseTimeout, TimeUnit.MILLISECONDS); } return clientDriver.addExpectation(request, response); }