### Question:
ValidReferencesValidator implements ConstraintValidator<ValidReferences, Schema>, ValidationErrorDescriptorBuilder { @Override public boolean isValid(Schema value, ConstraintValidatorContext context) { return findInvalidReferences(value).isEmpty(); }  @Override void initialize(ValidReferences constraintAnnotation); @Override boolean isValid(Schema value, ConstraintValidatorContext context); @Override ErrorDescriptor build(ConstraintViolation violation);  }### Answer:
@Test public void isValid_invalidReference_false() { schema.setResources(Collections.singletonList(RESOURCE_ELEMENT_WITH_INVALID_PATH_NAME)); boolean result = validReferencesValidator.isValid(schema, null); assertFalse(result); }
@Test public void isValid_validReference_true() { boolean result = validReferencesValidator.isValid(schema, null); assertTrue(result); }