Adding and refactoring helper tests