use of com.nike.backstopper.handler.UnexpectedMajorExceptionHandlingError in project riposte by Nike-Inc.
the class RiposteApiExceptionHandlerTest method maybeHandleErrorExplosionThrowsUnexpectedMajorErrorHandlingError.
// Note the difference between UnexpectedMajor**Exception**HandlingError and UnexpectedMajor**Error**HandlingError. I know, I know, confusing and annoying. Adapters can be like that.
@Test(expected = UnexpectedMajorErrorHandlingError.class)
public void maybeHandleErrorExplosionThrowsUnexpectedMajorErrorHandlingError() throws UnexpectedMajorExceptionHandlingError, UnexpectedMajorErrorHandlingError {
UnexpectedMajorExceptionHandlingError innerExplosion = new UnexpectedMajorExceptionHandlingError("intentional kaboom", new Exception());
doThrow(innerExplosion).when(adapterSpy).maybeHandleException(any(Throwable.class), any(RequestInfoForLogging.class));
RequestInfo requestInfoMock = mock(RequestInfo.class);
adapterSpy.maybeHandleError(new Exception(), requestInfoMock);
}
Aggregations