refactors tests to remove mocks