if (invokeResponseHandler) {
Object ret = client.invoke(null, mockedHttpRequestBuilder, mockedHttpResponseHandler,
mockedHttpExceptionHandler);
Assert.assertEquals(ret, Boolean.TRUE);
new Verifications() {
{
mockedHttpResponseHandler.handle(mockedHttpResponse);
times = 1;
}
};
}
if (invokeExceptionHandler) {
try {
client.invoke(null, mockedHttpRequestBuilder, mockedHttpResponseHandler, mockedHttpExceptionHandler);
Assert.fail("did not receive RuntimeException");
} catch (Throwable e) {
Assert.assertEquals(e.getClass(), RuntimeException.class);
}
new Verifications() {
{
mockedHttpExceptionHandler.handle(mockedHttpResponse);
times = 1;
}
};