refine unit test