Refactoring util tests