url = createURL("", params);
conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("content-type", RestConstants.XML_CONTENT_TYPE);
conn.setDoOutput(true);
jobConf.writeXml(conn.getOutputStream());
assertEquals(HttpServletResponse.SC_CREATED, conn.getResponseCode());
obj = (JSONObject) JSONValue.parse(new InputStreamReader(conn.getInputStream()));
assertEquals(MockDagEngineService.JOB_ID + wfCount, obj.get(JsonTags.JOB_ID));
assertTrue(MockDagEngineService.started.get(wfCount));
Services services = Services.get();