refactor some test case