Mongocxx testing

Hi, I am a long-time user of the Java Driver, but new to the C++ driver. I am trying to test my code. I would rather use mocks than running an actual server and I am wondering if such a thing is possible. It looks like there are mocks used in the tests for the driver itself (for example mongo-cxx-driver/src/mongocxx/test/collection_mocked.cpp at f7b69d33d4818d636bb14e0c757bac1e50cee4cc · mongodb/mongo-cxx-driver · GitHub), but the necessary headers to replicate this are not installed by cmake.

Is there a way to get cmake to install these headers? Is there some other mocking library I could use? I tried gmock, but the collection methods are not virtual, so that doesn’t work too well.

For what it’s worth, I’m using bazel to compile my code, basically following the example from GitHub - dieortin/mongocxx-bazel: The mongocxx driver (and its dependencies) built with Bazel

I was able to wrap the collection and cursor classes to make the methods virtual and I have been able to test with those. It still seems sub-optimal, so if there’s a better way please let me know.