[SD-783] Fixing the test and code after refactoring.
[SD-783] Reverting the modified code.