Refactor code test.