/**
         * Tests the deletion logic.
         * @throws Exception if anything goes wrong
         */
        public void VerifyDeleting()
        {
            var groupName = resource.ResourceGroupName;

            collection.DeleteById(resource.Id);
            try
            {
                resourceGroups.BeginDeleteByName(groupName);
            }
            catch
            {
                // Do not care if RG delete will fail.
            }
        }