[SD-668] Refactored the repetitive code to a function
Small Change to trigger travis build