added functionality to create a new controller to the appfactory class with tests