@Test(expected = RuntimeException.class) public void testRespondWithJsonWriterException() throws IOException { when(response.getWriter()).thenThrow(new IOException()); mock.respondWithJson(response, JSON_OBJECT); }
protected void respondWithJson(final HttpServletResponse response, final JSONObject jsonObject) { configureResponse(ResponseTypes.JSON_OBJECT, response, jsonObject); }
BaseRequestHandler extends MinimalRequestHandler { protected void respondWithJson(final HttpServletResponse response, final JSONObject jsonObject) { configureResponse(ResponseTypes.JSON_OBJECT, response, jsonObject); } }
BaseRequestHandler extends MinimalRequestHandler { protected void respondWithJson(final HttpServletResponse response, final JSONObject jsonObject) { configureResponse(ResponseTypes.JSON_OBJECT, response, jsonObject); } protected  BaseRequestHandler(UserRepository userRepository, WorkspaceRepository workspaceRepository, Configuration configuration); }
BaseRequestHandler extends MinimalRequestHandler { protected void respondWithJson(final HttpServletResponse response, final JSONObject jsonObject) { configureResponse(ResponseTypes.JSON_OBJECT, response, jsonObject); } protected  BaseRequestHandler(UserRepository userRepository, WorkspaceRepository workspaceRepository, Configuration configuration); @Override abstract void handle(HttpServletRequest request, HttpServletResponse response, HandlerChain chain); static void setMaxAge(final HttpServletResponse response, int numberOfSeconds); static String generateETag(byte[] data); static void addETagHeader(final HttpServletResponse response, String eTag); boolean testEtagHeaders(HttpServletRequest request, HttpServletResponse response, String eTag); UserRepository getUserRepository(); WorkspaceRepository getWorkspaceRepository(); ObjectMapper getObjectMapper(); }
BaseRequestHandler extends MinimalRequestHandler { protected void respondWithJson(final HttpServletResponse response, final JSONObject jsonObject) { configureResponse(ResponseTypes.JSON_OBJECT, response, jsonObject); } protected  BaseRequestHandler(UserRepository userRepository, WorkspaceRepository workspaceRepository, Configuration configuration); @Override abstract void handle(HttpServletRequest request, HttpServletResponse response, HandlerChain chain); static void setMaxAge(final HttpServletResponse response, int numberOfSeconds); static String generateETag(byte[] data); static void addETagHeader(final HttpServletResponse response, String eTag); boolean testEtagHeaders(HttpServletRequest request, HttpServletResponse response, String eTag); UserRepository getUserRepository(); WorkspaceRepository getWorkspaceRepository(); ObjectMapper getObjectMapper();  }