Refactored the test.