Refactor mock methods