infer mocks from tests