assertEquals("john add_node", folderA.getACL().getPermissionEntries().get(1).getAsString());
assertEquals("john set_property", folderA.getACL().getPermissionEntries().get(2).getAsString());
assertEquals("john remove", folderA.getACL().getPermissionEntries().get(3).getAsString());
Session sessJohn = repository.login(new CredentialsImpl("john", "exo".toCharArray()), "ws");
ExtendedNode folderB = (ExtendedNode)sessJohn.getRootNode().getNode("folderA").addNode("folderB", "nt:folder");
folderB.addMixin("exo:privilegeable");
folderB.setPermission("any", new String[]{"read"});
sessJohn.save();
assertEquals(5, folderB.getACL().getPermissionEntries().size());
assertEquals("john read", folderB.getACL().getPermissionEntries().get(0).getAsString());
assertEquals("john add_node", folderB.getACL().getPermissionEntries().get(1).getAsString());
assertEquals("john set_property", folderB.getACL().getPermissionEntries().get(2).getAsString());
assertEquals("john remove", folderB.getACL().getPermissionEntries().get(3).getAsString());
assertEquals("any read", folderB.getACL().getPermissionEntries().get(4).getAsString());
// Login as anonim.
// Tthis session use on server side, thank SessionProvider.
repository.login(new CredentialsImpl(IdentityConstants.ANONIM, "exo".toCharArray()), "ws");
String path = getPathWS() + "/folderA/folderB";
ContainerResponse response = service(WebDAVMethods.GET, path, "", null, null);
assertEquals("Successful result expected (200), but actual is: " + response.getStatus(), 200, response.getStatus());