RepositoryFile testFile = new RepositoryFile( "Test Folder", null, null ); //$NON-NLS-1$
Map<IPermissionRecipient, IPermissionMask> perms = new LinkedHashMap<IPermissionRecipient, IPermissionMask>();
perms.put( new SimpleUser( "suzy" ), new SimplePermissionMask( IPentahoAclEntry.PERM_EXECUTE ) );
perms.put( new SimpleRole( "ROLE_POWER_USER" ), new SimplePermissionMask( IPentahoAclEntry.PERM_SUBSCRIBE ) );
SpringSecurityPermissionMgr.instance().setPermissions( perms, testFile );
PentahoBasicAclVoter voter = new PentahoBasicAclVoter();
assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile, IPentahoAclEntry.PERM_EXECUTE ) );
assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile, IPentahoAclEntry.PERM_SUBSCRIBE ) );
assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile,
IPentahoAclEntry.PERM_ADMINISTRATION ) );
PentahoAclEntry entry = voter.getEffectiveAcl( PentahoSessionHolder.getSession(), testFile );
assertNotNull( entry );
assertEquals( entry.printPermissionsBlock(), "XSCUDP" ); //$NON-NLS-1$
return null;
}