JustBeforeEach(func() {
			runCLIErr = cmd.Execute(flagContext)
		})

		It("tells the user it is creating the service broker", func() {
			Expect(runCLIErr).NotTo(HaveOccurred())
			Expect(ui.Outputs()).To(ContainSubstrings(
				[]string{"Creating service broker", "service-broker", "my-user"},
				[]string{"OK"},
			))
		})

		It("tries to create the service broker", func() {
			Expect(runCLIErr).NotTo(HaveOccurred())
			Expect(serviceBrokerRepo.CreateCallCount()).To(Equal(1))
			name, url, username, password, spaceGUID := serviceBrokerRepo.CreateArgsForCall(0)
			Expect(name).To(Equal("service-broker"))
			Expect(url).To(Equal("url"))
			Expect(username).To(Equal("username"))
			Expect(password).To(Equal("password"))
			Expect(spaceGUID).To(Equal(""))
		})

		Context("when the --space-scoped flag is passed", func() {
			BeforeEach(func() {
				err := flagContext.Parse("service-broker", "username", "password", "url", "--space-scoped")
				Expect(err).NotTo(HaveOccurred())
			})

			It("tries to create the service broker with the targeted space guid", func() {