test_agencies refactoring.