### Question:
ConsistentReferenceNameValidator implements ConstraintValidator<ConsistentReferenceName, ReferenceElement>,
        ValidationErrorDescriptorBuilder { protected String getReferencedResourceName(String referencePath){ return referencePath.substring(referencePath.lastIndexOf(".") + 1); }  @Override ErrorDescriptor build(ConstraintViolation violation); @Override void initialize(ConsistentReferenceName constraintAnnotation); @Override boolean isValid(ReferenceElement value, ConstraintValidatorContext context);  }### Answer:
@Test public void getReferencedResourceName(){ assertEquals("name3", validator.getReferencedResourceName("name1.name2.name3")); assertEquals("name1", validator.getReferencedResourceName("name1")); }