Further test refactoring and added Test::MockObject