Finished the addwithindex test case.