code: @Override
    @SuppressWarnings("unchecked")
    public <E extends Entity> E getEntity(String attributeName, Class<E> clazz) {
      Entity entity = delegate().getEntity(attributeName, clazz);
      if (clazz.equals(FileMeta.class)) {
        return entity != null ? (E) new FileMeta(newPretendingEntity(entity)) : null;
      } else {
        throw new UnsupportedOperationException("Can't return typed pretending entities");
      }
    }
docs: Because the File datatype has a reference to {@link FileMetaMetadata} it can happen that a
  typed FileMeta Entity is requested.