### Question:
AuthorizationService { public boolean isAdmin() { UserContextRole userRole = userRoleFromContextService.getUserRoleWithoutContext(); return userRole == UserContextRole.ADMIN; } @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 isAdmin_isAdmin_expectedTrue() { mockCurrentUserRole(UserContextRole.ADMIN); boolean actual = authorizationService.isAdmin(); Assert.assertTrue(actual); }
@Test public void isAdmin_isUser_expectedFalse() { mockCurrentUserRole(UserContextRole.USER); boolean actual = authorizationService.isAdmin(); Assert.assertFalse(actual); }