### Question:
AuthorizationService { public boolean hasMemberPrivilegeForDepartment(Long departmentId) { UserContextRole userRole = userRoleFromContextService.getUserRoleInUnitId(departmentId); return userRole.isHigherAuthorityTypeThan(UserContextRole.USER); } @Autowired  AuthorizationService(UserRoleFromContextService userRoleFromContextService); boolean isAdmin(); boolean hasManagerPrivilegeForDepartment(Long departmentId); boolean hasManagerPrivilegeForObjective(Long objectiveId); boolean hasManagerPrivilegeForKeyResult(Long keyResultId); boolean hasMemberPrivilegeForDepartment(Long departmentId); boolean hasMemberPrivilegeForObjective(Long objectiveId); boolean hasMemberPrivilegeForKeyResult(Long keyResultId); boolean isNoteOwner(Long noteId);  }### Answer:
@Test public void hasMemberPrivilegeForDepartment_isMember_expectedTrue() { mockCurrentUserRole(UserContextRole.OKRMEMBER); boolean actual = authorizationService.hasMemberPrivilegeForDepartment(departmentId); Assert.assertTrue(actual); }
@Test public void hasMemberPrivilegeForDepartment_isUser_expectedFalse() { mockCurrentUserRole(UserContextRole.USER); boolean actual = authorizationService.hasMemberPrivilegeForDepartment(departmentId); Assert.assertFalse(actual); }