code: private static void throwDuplicateAnnotationException(Class<?> entityClass,
        Class<? extends Annotation> annotationClass, PropertyMetadata metadata1,
        PropertyMetadata metadata2) {
      String format = "Class %s has at least two fields, %s and %s, with an annotation of %s. "
          + "A given entity can have at most one field with this annotation. ";
      String message = String.format(format, entityClass.getName(), metadata1.getName(),
          metadata2.getName(), annotationClass.getName());
      throw new EntityManagerException(message);
    }
docs: Raises an exception with a detailed message reporting that the entity has more than one field
  that has a specific annotation.
  
  @param entityClass
  the entity class
  @param annotationClass
  the annotation class
  @param metadata1
  the metadata of the first field
  @param metadata2
  the metadata of the second field that conflicts with the first