Refactored the test case a bit.