### Question:
JSONWorkflowListServlet extends AbstractJSONServlet { ObjectNode createJSONObject(WorkflowConfiguration cfg) { SortedSet<String> ids = new TreeSet<String>(); for (Workflow wf : cfg.getWorkflows()) { ids.add(wf.getID().toString()); } ArrayNode list = Util.MAPPER.createArrayNode(); for (String id : ids) { list.add(id); } ObjectNode object = Util.MAPPER.createObjectNode(); object.put(CelosClient.IDS_PARAM, list); return object; }    }### Answer:
@Test public void jsonCorrectlyProduced() throws Exception { WorkflowConfiguration cfg = WorkflowConfigurationParserTest.parseDir("json-workflow-list-servlet-test"); ArrayNode list = Util.MAPPER.createArrayNode(); list.add(new String("workflow-1")); list.add(new String("workflow-2")); ObjectNode obj = Util.MAPPER.createObjectNode(); obj.put("ids", list); Assert.assertEquals(obj, new JSONWorkflowListServlet().createJSONObject(cfg)); }