Small refactoring to make tests more readable