mocking isn't working as expected