Added MockTestBase class, Code refactoring