refine unit test.