DefaultHistoneProcessingExceptionProcessor extends HistoneProcessingExceptionProcessor { @Override protected void processInternal(HttpServletRequest request, HttpServletResponse response, Exception exception, String templateLocation) throws Exception { throw new RuntimeException("Error evaluating histone template '" + templateLocation + "': " + exception.getMessage(), exception); }    }
@Test public void testProcessInternal() throws Exception { try { HttpServletRequest request = mock(HttpServletRequest.class); HttpServletResponse response = mock(HttpServletResponse.class); postProcessor.process(request, response, new Exception("Some exception occured"), "someLocation"); fail("Exception should be thrown"); } catch (Exception ex) { assertThat(ex.getMessage(), is("Error evaluating histone template 'someLocation': Some exception occured")); } }