Refactoring tests to make it easier to get data