public void onFailure(Method method, Throwable exception) {
assertNotNull(method);
assertNotNull(exception);
assertTrue(exception instanceof FailedStatusCodeException);
FailedStatusCodeException fsce = (FailedStatusCodeException) exception;
assertEquals(expectedStatusCode, fsce.getStatusCode());
finishTest();
}
};
}