### Question:
AuthorizationService { public boolean isNoteOwner(Long noteId) { UserContextRole userRole = userRoleFromContextService.getUserRoleInNoteId(noteId); return userRole == UserContextRole.ENTITYOWNER; } @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 isNoteOwner_isOwner_expectedTrue() { mockCurrentUserRole(UserContextRole.ENTITYOWNER); boolean actual = authorizationService.isNoteOwner(noteId); Assert.assertTrue(actual); }
@Test public void isNoteOwner_isUser_expectedFalse() { mockCurrentUserRole(UserContextRole.USER); boolean actual = authorizationService.isNoteOwner(noteId); Assert.assertFalse(actual); }