### Question:
SchedulerServlet extends AbstractServlet { Set<WorkflowID> getWorkflowIDs(HttpServletRequest req) { String idString = req.getParameter(CelosClient.IDS_PARAM); if (idString == null) { return Collections.<WorkflowID>emptySet(); } else { String[] idArray = idString.split(","); Set<WorkflowID> workflowIDs = new HashSet<>(); for (int i = 0; i < idArray.length; i++) { workflowIDs.add(new WorkflowID(idArray[i])); } return workflowIDs; } }    }### Answer:
@Test public void parsesIDsParameterMissing() throws Exception { HttpServletRequest req = mock(HttpServletRequest.class); when(req.getParameter(CelosClient.IDS_PARAM)).thenReturn(null); Assert.assertEquals(Collections.emptySet(), new SchedulerServlet().getWorkflowIDs(req)); }
@Test public void parsesIDsParameter() throws Exception { HttpServletRequest req = mock(HttpServletRequest.class); when(req.getParameter(CelosClient.IDS_PARAM)).thenReturn("foo,bar"); Set<WorkflowID> ids = new HashSet<>(); ids.add(new WorkflowID("foo")); ids.add(new WorkflowID("bar")); Assert.assertEquals(ids, new SchedulerServlet().getWorkflowIDs(req)); }