#660: Add mocking to test
Merge pull request #678 from hildo/iss660

#678: pull request #660: Add mocking to test