Improved trait mocking.