[IMP]Readded and improved code for test case in purchase.