### Question:
GenericToProgramValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return !isStudentOrParent() && EntityNames.PROGRAM.equals(entityType) && !isTransitive; }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> ids); @Override SecurityUtil.UserContext getContext();  }### Answer:
@Test public void testCanValidate() { setupCurrentUser(teacher1); Assert.assertTrue(validator.canValidate(EntityNames.PROGRAM, false)); Assert.assertFalse(validator.canValidate(EntityNames.PROGRAM, true)); injector.setStaffContext(); Assert.assertTrue(validator.canValidate(EntityNames.PROGRAM, false)); Assert.assertFalse(validator.canValidate(EntityNames.PROGRAM, true)); }