code: private static void validate(@NotNull EntityMetadata entityMetadata) {
          if (StringUtils.isEmpty(entityMetadata.getTableName())) {
              throw new MetadataException(String.format("Invalid table name: \"%s\"", entityMetadata.getTableName()));
          }
  
          if (entityMetadata.getPartitionKeySize() < 1) {
              throw new MetadataException(String.format("Entity \"%s\"must contains primary key", entityMetadata.getTableName()));
          }
      }
docs: Validate entity metadata
  
  @param entityMetadata Entity Metadata instance
  
  @throws MetadataException if invalid metadada was provided