) BeforeEach(func() { fakeCloudControllerClient = new(v2actionsfakes.FakeCloudControllerClient) actor = NewActor(fakeCloudControllerClient) }) Describe("GetOrphanedRoutesBySpace", func() { BeforeEach(func() { fakeCloudControllerClient.GetRouteApplicationsStub = func(routeGUID string, queries []ccv2.Query) ([]ccv2.Application, ccv2.Warnings, error) { switch routeGUID { case "orphaned-route-guid-1": return []ccv2.Application{}, nil, nil case "orphaned-route-guid-2": return []ccv2.Application{}, nil, nil case "not-orphaned-route-guid-3": return []ccv2.Application{ {GUID: "app-guid"}, }, nil, nil } Fail("Unexpected route-guid") return []ccv2.Application{}, nil, nil } }) Context("when there are orphaned routes", func() { BeforeEach(func() { fakeCloudControllerClient.GetSpaceRoutesReturns([]ccv2.Route{ { GUID: "orphaned-route-guid-1", DomainGUID: "some-domain-guid", },