@Test
public void testDoPrivilegedWhenNoMatchingPermission()
{

    Class<? extends Exception> expectedException = null;
    if (SecurityManagerHelper.isSecurityManagerEnabled())
    {
        expectedException = AccessControlException.class;
    }
    testDoPrivileged(expectedException, new PrivilegedAction<Void>()
    {
        @Override
        public Void run()
        {
            System.getProperty("test");
            return null;
        }
    }, Arrays.<Permission> asList(new PropertyPermission("anotherValue", "read")));
}