Function mocking for unit testing

WWW: https://nbenn.github.io/mockthat
