### Question:
StudentCompetencyContextResolver implements ContextResolver { @Override public Set<String> findGoverningEdOrgs(Entity entity) { if (entity == null) { return Collections.emptySet(); } String studentSectionAssociationId = (String) entity.getBody().get(ParameterConstants.STUDENT_SECTION_ASSOCIATION_ID); Entity studentSectionAssociation = repo.findById(EntityNames.STUDENT_SECTION_ASSOCIATION, studentSectionAssociationId); if (studentSectionAssociation == null) { return Collections.emptySet(); } String studentId = (String) studentSectionAssociation.getBody().get(ParameterConstants.STUDENT_ID); return studentResolver.findGoverningEdOrgs(studentId, entity); }  @Override Set<String> findGoverningEdOrgs(Entity entity);  }### Answer:
@Test public void noStudentSectionAssociation() { Entity studentCompetency = buildStudentCompetency(); when(repo.findById(EntityNames.STUDENT_SECTION_ASSOCIATION, "association123")).thenReturn(null); assertEquals(Collections.<String> emptySet(), underTest.findGoverningEdOrgs(studentCompetency)); }
@Test public void shouldFollowStudent() { Entity studentCompetency = buildStudentCompetency(); when(repo.findById(EntityNames.STUDENT_SECTION_ASSOCIATION, "association123")).thenReturn(buildStudentSectionAssociation()); Set<String> topLeas = new HashSet<String>(Arrays.asList("lea1", "lea2")); when(studentResolver.findGoverningEdOrgs("student123", studentCompetency)).thenReturn(topLeas); assertEquals(topLeas, underTest.findGoverningEdOrgs(studentCompetency)); }