### Question:
BaseRequestHandler extends MinimalRequestHandler { protected void respondWithPlaintext(final HttpServletResponse response, final String plaintext) { configureResponse(ResponseTypes.PLAINTEXT, response, plaintext); } 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();  }### Answer:
@Test(expected = NullPointerException.class) public void testRespondWithPlaintextInvalidResponse() { mock.respondWithPlaintext(null, REPLY); }
@Test(expected = NullPointerException.class) public void testRespondWithPlaintextInvalidPlaintext() { mock.respondWithPlaintext(response, (String)null); }
@Test public void testRespondWithPlaintext() throws IOException { when(response.getWriter()).thenReturn(writer); mock.respondWithPlaintext(response, REPLY); }