### Question:
StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); }  @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> validate(String entityType, Set<String> ids); @Override SecurityUtil.UserContext getContext();  }### Answer:
@Test public void testCanValidateStaffToReportCard() { assertTrue(validator.canValidate(EntityNames.REPORT_CARD, false)); }
@Test public void testCanValidateStaffToAttendance() throws Exception { assertTrue(validator.canValidate(EntityNames.ATTENDANCE, false)); }
@Test public void testCanValidateStaffToDisciplineAction() throws Exception { assertTrue(validator.canValidate(EntityNames.DISCIPLINE_ACTION, false)); }
@Test public void testCanValidateStaffToStudentAcademicRecord() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_ACADEMIC_RECORD, false)); }
@Test public void testCanValidateStaffToStudentAssessment() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_ASSESSMENT, false)); }
@Test public void testCanValidateStaffToStudentDisciplineIncident() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_DISCIPLINE_INCIDENT_ASSOCIATION, false)); }
@Test public void testCanValidateStaffToStudentGradebookEntry() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_GRADEBOOK_ENTRY, false)); }
@Test public void testCanValidateStaffToStudentParentAssociation() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_PARENT_ASSOCIATION, false)); }
@Test public void testCanValidateStaffToStudentSchoolAssociation() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_SCHOOL_ASSOCIATION, false)); }
@Test public void testCanValidateStaffToStudentSectionAssociation() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_SECTION_ASSOCIATION, false)); }
@Test public void testCanNotValidateOtherEntities() throws Exception { assertFalse(validator.canValidate(EntityNames.STUDENT, false)); }