### Question:
ValidReferencesValidator implements ConstraintValidator<ValidReferences, Schema>, ValidationErrorDescriptorBuilder { @Override public ErrorDescriptor build(ConstraintViolation violation) { final List<String> invalidReferences = findInvalidReferences((Schema) violation.getInvalidValue()); final ErrorDescriptor errorDescriptor = new ErrorDescriptor().setErrorCode(ValidReferences.errorCode) .setMessage("Schema contains invalid references: " + invalidReferences.toString()); for (String invalidReference : invalidReferences) { errorDescriptor.addProperties(new ClientProperty().setKey(ValidReferences.PROPERTY_INVALID_REFERENCE) .setValue(invalidReference)); } return errorDescriptor; }  @Override void initialize(ValidReferences constraintAnnotation); @Override boolean isValid(Schema value, ConstraintValidatorContext context); @Override ErrorDescriptor build(ConstraintViolation violation);  }### Answer:
@Test public void build_invalidReference_errorDescriptor() { schema.setResources(null); ErrorDescriptor result = validReferencesValidator.build(constraintViolation); assertEquals(ERROR_DESCRIPTOR, result); }