Initial refactor of unit test.