Minor tests refactoring.