Currently I am building tests for an existing implementation of IDM. I am using google-mock, a mocking library for C++ classes. Let’s see an example of dependency injection. This basic technique is used when you are mocking your classes and, thus, obtain non-fragile tests.