public async Task StartDelete() { ManagementGroup mgmtGroup = await Client.GetManagementGroups().CreateOrUpdateAsync(Recording.GenerateAssetName("mgmt-group-"), new CreateManagementGroupRequest()); var deleteOp = await mgmtGroup.StartDeleteAsync(); await deleteOp.WaitForCompletionResponseAsync(); var ex = Assert.ThrowsAsync <RequestFailedException>(async() => await mgmtGroup.GetAsync()); Assert.AreEqual(404, ex.Status); }