### Question:
ConsistentReferenceNameValidator implements ConstraintValidator<ConsistentReferenceName, ReferenceElement>,
        ValidationErrorDescriptorBuilder { @Override public boolean isValid(ReferenceElement value, ConstraintValidatorContext context) { boolean result = true; final String referencePath = value.getReferencePath(); if(referencePath != null && value.getName() != null){ result = value.getName().equals(getReferencedResourceName(referencePath)); } return result; }  @Override ErrorDescriptor build(ConstraintViolation violation); @Override void initialize(ConsistentReferenceName constraintAnnotation); @Override boolean isValid(ReferenceElement value, ConstraintValidatorContext context);  }### Answer:
@Test public void isValid_true(){ assertTrue(validator .isValid(new ReferenceElement().setName("name3").setReferencePath("name1.name2.name3"), null)); }
@Test public void isValid_false(){ assertFalse(validator .isValid(new ReferenceElement().setName("name2").setReferencePath("name1.name2.name3"), null)); }