private static boolean replicaSetEnabled(MongoInstance instance) {
    BsonDocument command = new BsonDocument("replSetGetStatus", BsonBoolean.TRUE);
    return Flowable.fromPublisher(instance.client().getDatabase("admin").runCommand(command))
            .map(doc -> doc.getDouble("ok") == 1D)
            .onErrorReturnItem(false)
            .blockingSingle();
  }
Checks if current mongo cluster has <a href="https://www.mongodb.com/docs/manual/replication/">replication</a> enabled.
Change Streams only work with replication enabled.
criteria/mongo/test/org/immutables/criteria/mongo/ChangeStreamsTest.java