Refactor UnitTestCase::mock()

Makes it much simpler!