assertNotNull(status);
assertEquals(1, status.getResponse().size());
Response r = status.getResponse().get(0);
assertNotNull(r.getPropstat());
assertFalse(r.getPropstat().isEmpty());
DavAcl davAcl = new DavAcl(r);
assertNotNull("Query should give a owner name " + response, davAcl.getOwner());
assertEquals("Query should give us group name", "/group/somegroup", davAcl.getGroup());
assertNotNull("Query should result in an existing ACL", davAcl.getAces());
// check ACEs decoding
assertEquals(5, davAcl.getAces().size());
assertEquals("read", davAcl.getAces().get(0).getGranted().get(0));
assertEquals("write", davAcl.getAces().get(0).getGranted().get(1));
assertEquals("write-properties", davAcl.getAces().get(0).getGranted().get(2));
assertEquals("all", davAcl.getAces().get(1).getDenied().get(0));
//property ACLs should be handled
assertEquals(DavPrincipal.PrincipalType.PROPERTY,davAcl.getAces().get(0).getPrincipal().getPrincipalType());
assertEquals(new QName("DAV:", "owner"), davAcl.getAces().get(0).getPrincipal().getProperty());
//href ACLs should be handled
assertEquals(DavPrincipal.PrincipalType.HREF,davAcl.getAces().get(3).getPrincipal().getPrincipalType());
assertEquals("/some/user", davAcl.getAces().get(3).getPrincipal().getValue());
//key acl should be supported
assertEquals(DavPrincipal.PrincipalType.KEY,davAcl.getAces().get(4).getPrincipal().getPrincipalType());
assertEquals("all",davAcl.getAces().get(4).getPrincipal().getValue());
// inheritance ACLs
assertEquals("/", davAcl.getAces().get(0).getInherited());
// protected acls
assertTrue(davAcl.getAces().get(4).isProtected());
}
}