//fetch the JSON for the acl to verify the settings.
String getUrl = testFolderUrl + ".acl.json";
String json = H.getAuthenticatedContent(creds, getUrl, HttpTest.CONTENT_TYPE_JSON, null, HttpServletResponse.SC_OK);
assertNotNull(json);
JSONObject jsonObject = new JSONObject(json);
assertEquals(1, jsonObject.length());
JSONObject aceObject = jsonObject.optJSONObject(testUserId);
assertNotNull(aceObject);
String principalString = aceObject.optString("principal");
assertEquals(testUserId, principalString);
int order = aceObject.optInt("order");
assertEquals(0, order);
JSONArray grantedArray = aceObject.optJSONArray("granted");
assertNotNull(grantedArray);
assertEquals(1, grantedArray.length());
assertEquals("jcr:read", grantedArray.getString(0));
JSONArray deniedArray = aceObject.optJSONArray("denied");
assertNotNull(deniedArray);
assertEquals(1, deniedArray.length());
assertEquals("jcr:write", deniedArray.getString(0));
}