### Question:
DisciplineIncidentContextResolver implements ContextResolver { @Override public Set<String> findGoverningEdOrgs(Entity entity) { Set<String> edOrgs = new HashSet<String>(); Iterator<Entity> students = repo.findEach(EntityNames.STUDENT, Query.query(Criteria.where(DISCIPLINE_INCIDENT_ID).is(entity.getEntityId()))); while (students.hasNext()) { Entity student = students.next(); edOrgs.addAll(studentResolver.findGoverningEdOrgs(student.getEntityId(), entity)); } return edOrgs; }  @Override Set<String> findGoverningEdOrgs(Entity entity); static final String DISCIPLINE_INCIDENT_ID; }### Answer:
@Test public void testSingleStudent() { setFindEachReturn(Arrays.asList(student1)); Assert.assertEquals(new HashSet<String>(Arrays.asList("school1")), resolver.findGoverningEdOrgs(disciplineIncident)); }
@Test public void testMultipleStudents() { setFindEachReturn(Arrays.asList(student1, student2, student3)); Assert.assertEquals(new HashSet<String>(Arrays.asList("school1", "school2", "school3")), resolver.findGoverningEdOrgs(disciplineIncident)); }
@Test public void testNoStudentDIAssociation() { setFindEachReturn(Arrays.asList(student4)); Assert.assertTrue(resolver.findGoverningEdOrgs(disciplineIncident).isEmpty()); }