Version with mocking