acl.togglePermission(SimpleAclEntry.DELETE); assertTrue(acl.isPermitted(SimpleAclEntry.DELETE)); assertEquals("----D", acl.printPermissionsBlock());
    public void testCorrectOperation() {        String recipient = "marissa";        AclObjectIdentity objectIdentity = new NamedEntityObjectIdentity("domain",                "12");        SimpleAclEntry acl = new SimpleAclEntry(recipient, objectIdentity,                null, 0);        assertFalse(acl.isPermitted(SimpleAclEntry.ADMINISTRATION));        acl.addPermission(SimpleAclEntry.ADMINISTRATION);        assertTrue(acl.isPermitted(SimpleAclEntry.ADMINISTRATION));        assertFalse(acl.isPermitted(SimpleAclEntry.CREATE));        assertFalse(acl.isPermitted(SimpleAclEntry.DELETE));        assertFalse(acl.isPermitted(SimpleAclEntry.READ));        assertFalse(acl.isPermitted(SimpleAclEntry.WRITE));        assertEquals("A----", acl.printPermissionsBlock());        acl.deletePermission(SimpleAclEntry.ADMINISTRATION);        assertFalse(acl.isPermitted(SimpleAclEntry.ADMINISTRATION));        assertEquals("-----", acl.printPermissionsBlock());        acl.addPermissions(new int[] {SimpleAclEntry.READ, SimpleAclEntry.WRITE});        acl.addPermission(SimpleAclEntry.CREATE);        assertFalse(acl.isPermitted(SimpleAclEntry.ADMINISTRATION));        assertTrue(acl.isPermitted(SimpleAclEntry.CREATE));        assertFalse(acl.isPermitted(SimpleAclEntry.DELETE));        assertTrue(acl.isPermitted(SimpleAclEntry.READ));        assertTrue(acl.isPermitted(SimpleAclEntry.WRITE));        assertEquals("-RWC-", acl.printPermissionsBlock());        acl.deletePermission(SimpleAclEntry.CREATE);        acl.deletePermissions(new int[] {SimpleAclEntry.READ, SimpleAclEntry.WRITE});        assertEquals("-----", acl.printPermissionsBlock());        acl.togglePermission(SimpleAclEntry.CREATE);        assertTrue(acl.isPermitted(SimpleAclEntry.CREATE));        assertFalse(acl.isPermitted(SimpleAclEntry.ADMINISTRATION));        acl.togglePermission(SimpleAclEntry.CREATE);        assertFalse(acl.isPermitted(SimpleAclEntry.CREATE));    }