proper mocking in dev mode