requirementsFactory *requirementsfakes.FakeFactory
		configRepo          coreconfig.Repository
		tokenRefresher      *authenticationfakes.FakeRepository
		deps                commandregistry.Dependency

		serviceName            string
		servicePlanName        string
		publicServicePlanName  string
		privateServicePlanName string
		orgName                string
	)

	updateCommandDependency := func(pluginCall bool) {
		deps.UI = ui
		deps.RepoLocator = deps.RepoLocator.SetAuthenticationRepository(tokenRefresher)
		deps.ServicePlanHandler = actor
		deps.Config = configRepo
		commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("enable-service-access").SetDependency(deps, pluginCall))
	}

	BeforeEach(func() {
		ui = &testterm.FakeUI{}
		actor = new(actorsfakes.FakeServicePlanActor)
		configRepo = configuration.NewRepositoryWithDefaults()
		requirementsFactory = new(requirementsfakes.FakeFactory)
		tokenRefresher = new(authenticationfakes.FakeRepository)
	})

	runCommand := func(args []string) bool {
		return testcmd.RunCLICommand("enable-service-access", args, requirementsFactory, updateCommandDependency, false, ui)
	}