SequenceHandlingStatusServlet extends HttpServlet { @Override protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { doGet(req, resp); } @Autowired  SequenceHandlingStatusServlet(SequenceHandlingToggle sequenceHandlingToggle);   }
@Test public void testDoPostShouldCallDoGet() throws ServletException, IOException { given(resp.getWriter()).willReturn(printWriter); given(sequenceHandlingToggle.isOn()).willReturn(true); underTest.doPost(req, resp); verify(resp).setContentType("application/json"); verify(printWriter).write("{\"sequenceHandlingUsage\": true}"); verify(printWriter).flush(); verify(printWriter).close(); }