HistoneProcessingExceptionProcessor { public final void process(HttpServletRequest request, HttpServletResponse response, Exception exception, String templateLocation) throws Exception { Exception cause = getRootCause(exception); if (supports(cause.getClass())) { processInternal(request, response, cause, templateLocation); return; } if (next != null) { next.process(request, response, cause, templateLocation); } }  final void process(HttpServletRequest request, HttpServletResponse response,
                              Exception exception, String templateLocation); HistoneProcessingExceptionProcessor setNext(HistoneProcessingExceptionProcessor processor);  }
@Test public void testProcess() throws Exception { try { exceptionProcessor.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")); } try { exceptionProcessor.process(request, response, new ParserException("parsing was failed", "uri", 0), "someLocation"); fail("Exception should be thrown"); } catch (Exception ex) { assertThat(ex.getMessage(), is("Error evaluating histone template 'someLocation' in line 0: parsing was failed")); } }