*/
public void testGetEntitlementsFromServlet() throws Exception
{
// call the ACLServlet using the identity "Administrator" as a parameter.
URL url = new URL(HttpUtils.getBaseURL() + "acl-integration/acl?identity=Administrator");
HttpMethodBase response = HttpUtils.accessURL(url, "JBoss ACL Test", HttpURLConnection.HTTP_OK);
// each line of the response has the following format: resource_id:permissions
List<String> entitlements = this.readEntitlementsFromResponse(response);
assertEquals("ACLServlet retrieved an invalid number of entitlement entries", 2, entitlements.size());
// Administrator should have CREATE,READ,UPDATE and DELETE permissions on both resources (id=1 and id=2).
assertTrue("Invalid entitlement entry found", entitlements.contains("1:CREATE,READ,UPDATE,DELETE"));