### Question:
TeacherToStudentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); }  @Override boolean canValidate(String entityType, boolean through); @Override Set<String> validate(String entityName, Set<String> ids); @Override Set<String> getValid(String entityType, Set<String> ids); @Override void setRepo(PagingRepositoryDelegate<Entity> repo); @Override SecurityUtil.UserContext getContext();  }### Answer:
@Test public void testCanValidateTeacherToStudent() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT, false)); }
@Test public void testCanNotValidateOtherEntities() throws Exception { assertFalse(validator.canValidate(EntityNames.ATTENDANCE, false)); }