unit test refactoring to more readable