public RepositorySetup build() {
      checkState(executor != null, "executor is not set");
      checkState(database != null, "database is not set");
      checkState(codecRegistry != null, "codecRegistry is not set");
      checkState(fieldNamingStrategy != null, "fieldNamingStrategy is not set");

      return new RepositorySetup(executor, database, codecRegistry, fieldNamingStrategy);
    }
Builds unmodifiable instance of {@link RepositorySetup}.
@return repository setup instance.
mongo/src/org/immutables/mongo/repository/RepositorySetup.java