refactoring tests controllers