Added Testcases for exchangeArray's return value