Refactor on unit test.