final AllPermission allPermission = new AllPermission();
final HashMap grants = new HashMap();
grants.put( codeSource, new Permission[]{allPermission} );
final Policy policy = new DefaultPolicy( grants );
policy.refresh();
final PermissionCollection resultPermissions = policy.getPermissions( new CodeSource( null, new Certificate[ 0 ] ) );
final Enumeration enumeration = resultPermissions.elements();
assertEquals( "Permissions for codeSource" + codeSource,
false, enumeration.hasMoreElements() );
}