Added the CannotRequestHasRoleException exception and added few tests for hasRole.