edited tests to use a mock