/******************************************************************************************************************* * ******************************************************************************************************************/ @Test public void must_call_some_RequestProcessors_when_RuntimeException() throws Exception { final RuntimeException e = new RuntimeException("Purportedly thrown exception"); mockRequestProcessor3.setThrowable(e); commonExceptionTestSequence(); verify(responseBuilder).forException(same(e)); // inOrder.verifyNoMoreInteractions(); }
/******************************************************************************************************************* * ******************************************************************************************************************/ @Test public void must_call_some_RequestProcessors_when_HttpStatusException_with_SC_FOUND() throws Exception { final HttpStatusException e = new HttpStatusException(SC_FOUND); mockRequestProcessor3.setThrowable(e); commonExceptionTestSequence(); verify(responseBuilder).forException(same(e)); // inOrder.verifyNoMoreInteractions(); }
/******************************************************************************************************************* * ******************************************************************************************************************/ @Test public void must_call_some_RequestProcessors_when_NotFoundException() throws Exception { final NotFoundException e = new NotFoundException(); mockRequestProcessor3.setThrowable(e); commonExceptionTestSequence(); verify(responseBuilder).forException(same(e)); // inOrder.verifyNoMoreInteractions(); }
/******************************************************************************************************************* * ******************************************************************************************************************/ @Test public void must_call_some_RequestProcessors_when_HttpStatusException_with_generic_Http_status() throws Exception { final HttpStatusException e = new HttpStatusException(SC_NOT_ACCEPTABLE); mockRequestProcessor3.setThrowable(e); commonExceptionTestSequence(); verify(responseBuilder).forException(same(e)); // inOrder.verifyNoMoreInteractions(); }