Refactored tests so all mocks are in separate file.