zuulServletFilter = spy(zuulServletFilter);
try {
zuulServletFilter.zuulRunner = zuulRunner;
when(servletResponse.getWriter()).thenReturn(new PrintWriter(new ByteArrayOutputStream()));
ZuulException e = new ZuulException("test", 510, "test");
doThrow(e).when(zuulServletFilter).postRouting();
zuulServletFilter.doFilter(servletRequest, servletResponse, filterChain);
verify(zuulServletFilter, times(1)).postRouting();
verify(zuulServletFilter, times(1)).error(e);
} catch (Exception e) {
e.printStackTrace();
fail(e.toString());
}
}