Implemented trait mocking.
Merge pull request #114 from whatthejeff/trait_mocking_master