### Question:
UserRoleFromContextService { public UserContextRole getUserRoleInObjectiveId(Long objectiveId) { OkrUnit contextDepartment = getUnitOfObjective(objectiveId); return getUserRoleInUnit(contextDepartment); } @Autowired  UserRoleFromContextService(
      UnitRepository<OkrChildUnit> unitRepository,
      ObjectiveRepository objectiveRepository,
      KeyResultRepository keyResultRepository,
      NoteRepository noteRepository,
      AdminUserRepository adminUserRepository,
      UserService userService); UserContextRole getUserRoleWithoutContext(); UserContextRole getUserRoleInUnitId(Long unitId); UserContextRole getUserRoleInObjectiveId(Long objectiveId); UserContextRole getUserRoleInKeyResultId(Long keyResultId); UserContextRole getUserRoleInNoteId(Long noteId); UserContextRole getUserRoleInUnit(OkrUnit okrUnit);  }### Answer:
@Test public void getRoleFromObjective_OkrMember_expectedMemberRole() { when(currentUser.getId()).thenReturn(okrMemberId); UserContextRole actualRole = userRoleFromContextService.getUserRoleInObjectiveId(objectiveId); Assert.assertEquals(UserContextRole.OKRMEMBER, actualRole); }