Refactor mixpanel client tests.