Issues with test with mocked object