Refactor of unit tests.