@Test public void testDoGetShouldCallDoChangeOfStubConfigurationService() throws ServletException, IOException, ClassNotFoundException { underTest.doGet(request, response); verify(stubConfigurationStatusService).changeStatus(true, DEFAULT_GROUPNAME, request); }
@Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { String groupName = request.getParameter("groupname"); String enabledDisabled = request.getParameter("nextstatus"); if ("TRUE".equalsIgnoreCase(enabledDisabled) || "FALSE".equalsIgnoreCase(enabledDisabled)) { boolean nextStatus = Boolean.parseBoolean(enabledDisabled); try { stubConfigurationStatusService.changeStatus(nextStatus, groupName, request); } catch (ClassNotFoundException e) { throw new IOException(e); } } else { writeErrorToResponse(response); } }
StubConfigurationStatusServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { String groupName = request.getParameter("groupname"); String enabledDisabled = request.getParameter("nextstatus"); if ("TRUE".equalsIgnoreCase(enabledDisabled) || "FALSE".equalsIgnoreCase(enabledDisabled)) { boolean nextStatus = Boolean.parseBoolean(enabledDisabled); try { stubConfigurationStatusService.changeStatus(nextStatus, groupName, request); } catch (ClassNotFoundException e) { throw new IOException(e); } } else { writeErrorToResponse(response); } } }
StubConfigurationStatusServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { String groupName = request.getParameter("groupname"); String enabledDisabled = request.getParameter("nextstatus"); if ("TRUE".equalsIgnoreCase(enabledDisabled) || "FALSE".equalsIgnoreCase(enabledDisabled)) { boolean nextStatus = Boolean.parseBoolean(enabledDisabled); try { stubConfigurationStatusService.changeStatus(nextStatus, groupName, request); } catch (ClassNotFoundException e) { throw new IOException(e); } } else { writeErrorToResponse(response); } } @Autowired  StubConfigurationStatusServlet(StubConfigurationStatusService stubConfigurationStatusService); }
StubConfigurationStatusServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { String groupName = request.getParameter("groupname"); String enabledDisabled = request.getParameter("nextstatus"); if ("TRUE".equalsIgnoreCase(enabledDisabled) || "FALSE".equalsIgnoreCase(enabledDisabled)) { boolean nextStatus = Boolean.parseBoolean(enabledDisabled); try { stubConfigurationStatusService.changeStatus(nextStatus, groupName, request); } catch (ClassNotFoundException e) { throw new IOException(e); } } else { writeErrorToResponse(response); } } @Autowired  StubConfigurationStatusServlet(StubConfigurationStatusService stubConfigurationStatusService);  }
StubConfigurationStatusServlet extends HttpServlet { @Override protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException { String groupName = request.getParameter("groupname"); String enabledDisabled = request.getParameter("nextstatus"); if ("TRUE".equalsIgnoreCase(enabledDisabled) || "FALSE".equalsIgnoreCase(enabledDisabled)) { boolean nextStatus = Boolean.parseBoolean(enabledDisabled); try { stubConfigurationStatusService.changeStatus(nextStatus, groupName, request); } catch (ClassNotFoundException e) { throw new IOException(e); } } else { writeErrorToResponse(response); } } @Autowired  StubConfigurationStatusServlet(StubConfigurationStatusService stubConfigurationStatusService);   }