Use of mocks in C++ unit tests

#### Reviewers
@flopezag 

#### Description
Related to issue #24, this pull request solves errors found when running unittests in Jenkins CI

#### Testing
All tests passed.