conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
assertEquals(HttpServletResponse.SC_OK, conn.getResponseCode());
assertTrue(conn.getHeaderField("content-type").startsWith(RestConstants.JSON_CONTENT_TYPE));
JSONObject json = (JSONObject) JSONValue.parse(new InputStreamReader(conn.getInputStream()));
assertTrue(json.containsKey(JsonTags.OOZIE_SYSTEM_MODE));
assertEquals(SYSTEM_MODE.NORMAL.toString(), json.get(JsonTags.OOZIE_SYSTEM_MODE));
MockDagEngineService.reset();
params = new HashMap<String, String>();
params.put(RestConstants.ADMIN_SYSTEM_MODE_PARAM, SYSTEM_MODE.SAFEMODE.toString());