static CollectionResolver defaultResolver(MongoDatabase database, CodecRegistry registry) {
    Objects.requireNonNull(database, "database");
    Objects.requireNonNull(registry, "registry");
    return entityClass -> {
      final String collectionName = ContainerNaming.DEFAULT.name(entityClass);
      return database.getCollection(collectionName)
              .withDocumentClass(entityClass)
              .withCodecRegistry(registry);
    };
  }
Given a class resolve associated collection with document class and
{@link CodecRegistry} already set

@param entityType type
criteria/mongo/src/org/immutables/criteria/mongo/CollectionResolver.java