Added tests and mocks+