Refactoring unit tests.