@SneakyThrows
    private boolean isReplicationSetAlreadyInitialized() {
        // since we are creating a replica set with one node, this node must be primary (state = 1)
        final ExecResult execCheckRsInit = execInContainer(
            buildMongoEvalCommand("if(db.adminCommand({replSetGetStatus: 1})['myState'] != 1) quit(900)")
        );
        return execCheckRsInit.getExitCode() == CONTAINER_EXIT_CODE_OK;
    }
Gets a replica set url for a provided <code>databaseName</code>.

@param databaseName a database name.
@return a replica set url.
modules/mongodb/src/main/java/org/testcontainers/containers/MongoDBContainer.java