### Question:
StaffToCourseTranscriptValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.COURSE_TRANSCRIPT.equals(entityType) && isStaff(); }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> ids); @Override SecurityUtil.UserContext getContext();  }### Answer:
@Test public void testCanValidateAsStaff() { setupCurrentUser(staff1); Assert.assertTrue("Must be able to validate", validator.canValidate(EntityNames.COURSE_TRANSCRIPT, false)); Assert.assertTrue("Must be able to validate", validator.canValidate(EntityNames.COURSE_TRANSCRIPT, true)); Assert.assertFalse("Must not be able to validate", validator.canValidate(EntityNames.ADMIN_DELEGATION, false)); }