Refactor various controller tests to use factories.