* user only has Read access to the Privilege where the actual guard requires Read/Write access.
*
* @throws Exception
*/
public void testUserDeneiedAccessHasOnlyReadAccess() throws Exception {
UserPrivilegeVo userPriv = new UserPrivilegeVo();
userPriv.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
UserPrivilegeType.Key.MANAGE_REFERENCE_DATA_KEY.getKey()));
userPriv.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
PrivilegeActionType.Key.READ_KEY.getKey()));
UserPrivilegeVo allowedPriv = new UserPrivilegeVo();
allowedPriv.setPrivilegeType(TypeUtil.forKey(UserPrivilegeType.class,
UserPrivilegeType.Key.MANAGE_REFERENCE_DATA_KEY.getKey()));
allowedPriv.setActionType(TypeUtil.forKey(PrivilegeActionType.class,
PrivilegeActionType.Key.READ_WRITE_KEY.getKey()));
assertFalse("User should not have had access because read/write " +
"was needed but the user only had read access.", allowedPriv.isPrivileged(userPriv));
}