Added mocking

Added a factory and mocked it