@Test(expected = InsufientPermissionException.class) public void testNoPermission() { User u = new User(); u.setPermission(Permission.EXECUTE | Permission.READ); pt.needsWrite(u); }
@Test(expected = IllegalArgumentException.class) public void testNoUserParam() { pt.needsWrite(); }
@Test public void testPermissionOK() { User u = new User(); u.setPermission(Permission.WRITE); pt.needsWrite(u); }