Refactor mock provider