[refactor] refactoring the unittest