raoxunrong, remove duplicated code in test