(cherry picked from commit fe6bc411dd)
fe6bc411dd
This also adds some mocks to the libcommon test executable, which hopefully will allow it to work with more of libcommon.