Added interfaces and mocking framework for unit testing