Refactor some amf_controller tests to use factories.