### Question:
BaseController { protected ModelAndView handleServiceException(ServiceException se, HttpServletRequest req, HttpServletResponse res) { if (isAjaxRequest(req)) { return handleAjaxException(new AjaxException(se), res); } return getErrorView(req); }  @ExceptionHandler(Exception.class) ModelAndView handleException(Exception ex, HttpServletRequest req, HttpServletResponse res);  }### Answer:
@Test public void testHandleServiceException() throws Exception { HttpResponse response = executeGet("/test/serviceExp"); Assert.assertEquals("Service异常捕获失败！", 500, response.getStatusLine().getStatusCode()); String resStr = EntityUtils.toString(response.getEntity(), defaultEncode); Assert.assertTrue("Service异常捕获失败！", resStr.contains("测试Service异常")); }