refactoring done: extracted test data in a common method to remove duplicate code