originalCreateRouteCmd = command_registry.Commands.FindCommand("create-route") fakeCreateRouteCmd = &fakeroute.FakeRouteCreator{} command_registry.Register(fakeCreateRouteCmd) cmd = &route.MapRoute{} cmd.SetDependency(deps, false) flagContext = flags.NewFlagContext(cmd.MetaData().Flags) factory = &fakerequirements.FakeFactory{} loginRequirement = &passingRequirement{Name: "login-requirement"} factory.NewLoginRequirementReturns(loginRequirement) applicationRequirement = &fakerequirements.FakeApplicationRequirement{} factory.NewApplicationRequirementReturns(applicationRequirement) fakeApplication := models.Application{} fakeApplication.Guid = "fake-app-guid" applicationRequirement.GetApplicationReturns(fakeApplication) domainRequirement = &fakerequirements.FakeDomainRequirement{} factory.NewDomainRequirementReturns(domainRequirement) fakeDomain = models.DomainFields{ Guid: "fake-domain-guid", Name: "fake-domain-name", } domainRequirement.GetDomainReturns(fakeDomain) minAPIVersionRequirement = &passingRequirement{Name: "min-api-version-requirement"}