Refactoring common code between protocols
Refactored common stubRepository code between protocols