refactoring on test to make it more readable