@Test public void shouldUseCRestExceptionHandle() throws Exception { Exception e = new Exception(); RuntimeException expected = new RuntimeException(); mockStatic(CRestException.class); when(CRestException.handle(e)).thenReturn(expected); Request request = mock(Request.class); try { toTest.handle(request, e); } catch (RuntimeException e1) { assertSame(expected, e1); verifyNoMoreInteractions(request); } }
public <T> T handle(Request request, Exception e) throws Exception { throw CRestException.handle(e); }
ErrorDelegatorHandler implements ErrorHandler { public <T> T handle(Request request, Exception e) throws Exception { throw CRestException.handle(e); } }
ErrorDelegatorHandler implements ErrorHandler { public <T> T handle(Request request, Exception e) throws Exception { throw CRestException.handle(e); }  }
ErrorDelegatorHandler implements ErrorHandler { public <T> T handle(Request request, Exception e) throws Exception { throw CRestException.handle(e); }  T handle(Request request, Exception e); }
ErrorDelegatorHandler implements ErrorHandler { public <T> T handle(Request request, Exception e) throws Exception { throw CRestException.handle(e); }  T handle(Request request, Exception e);  }