@Test public final void testDoPostShouldCallWriteFileContentToResponseWhenPathIsNotEmpty() throws ServletException, IOException { given(request.getPathInfo()).willReturn(null); underTest.doPost(request, response); verify(messageFileHandler).writeFileNamesToResponse(response, path); }
@Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); }
MessageHandlerServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } }
MessageHandlerServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  MessageHandlerServlet(LogFilePathProvider filePathProvider, MessageFileHandler messageFileHandler); }
MessageHandlerServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  MessageHandlerServlet(LogFilePathProvider filePathProvider, MessageFileHandler messageFileHandler);  }
MessageHandlerServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  MessageHandlerServlet(LogFilePathProvider filePathProvider, MessageFileHandler messageFileHandler);   }