public async Task CreateNamespaceAndGetEventhubCollection() { _resourceGroup = await CreateResourceGroupAsync(); string namespaceName = await CreateValidNamespaceName("testnamespacemgmt"); EventHubNamespaceCollection namespaceCollection = _resourceGroup.GetEventHubNamespaces(); EventHubNamespaceResource eHNamespace = (await namespaceCollection.CreateOrUpdateAsync(WaitUntil.Completed, namespaceName, new EventHubNamespaceData(DefaultLocation))).Value; EventHubCollection eventhubCollection = eHNamespace.GetEventHubs(); string eventhubName = Recording.GenerateAssetName("eventhub"); _eventHub = (await eventhubCollection.CreateOrUpdateAsync(WaitUntil.Completed, eventhubName, new EventHubData())).Value; _consumerGroupCollection = _eventHub.GetConsumerGroups(); }