refactor test and print the line to check with the expected answer.