[haiyang]refactor the unit test