It("tries to retrieve the router group", func() {
				Expect(err).NotTo(HaveOccurred())
				Expect(routingAPIRepo.ListRouterGroupsCallCount()).To(Equal(1))
			})

			It("prints a message", func() {
				Expect(err).NotTo(HaveOccurred())
				Expect(ui.Outputs()).To(ContainSubstrings(
					[]string{"Creating shared domain domain-name"},
				))
			})

			It("tries to create a shared domain with router group", func() {
				Expect(err).NotTo(HaveOccurred())
				Expect(domainRepo.CreateSharedDomainCallCount()).To(Equal(1))
				domainName, routerGroupGUID := domainRepo.CreateSharedDomainArgsForCall(0)
				Expect(domainName).To(Equal("domain-name"))
				Expect(routerGroupGUID).To(Equal("router-group-guid"))
			})

			It("prints success message", func() {
				Expect(err).NotTo(HaveOccurred())
				Expect(ui.Outputs()).To(ContainSubstrings(
					[]string{"OK"},
				))
			})

			Context("when listing router groups returns an error", func() {
				BeforeEach(func() {
					routingAPIRepo.ListRouterGroupsReturns(errors.New("router-group-error"))
				})