Made some modifications on the unit test as suggested in PR 1746