Refactoring controller tests
Adding toString method to validator