Refactored test to make it easier to add more tests.