         
         let key1 = SharingGroupRepository.LookupKey.sharingGroupId(sharingGroupId)
         let result1 = SharingGroupRepository(db).lookup(key: key1, modelInit: SharingGroup.init)
-        guard case .noObjectFound = result1 else {
+        guard case .found(let model) = result1, let sharingGroup = model as? Server.SharingGroup else {
+            XCTFail()
+            return
+        }
+        
+        guard sharingGroup.deleted else {
             XCTFail()
             return
         }

        }
    }
    
    /*
        Test remove user from sharing group
            When user is last user in sharing group-- should also remove sharing group.
            When user is not last user in the sharing group-- should not remove sharing group.
            When user has files in the sharing group-- those should be marked as deleted.
            When owning user has sharing users in sharing group
                Those should no longer be able to upload to the sharing group.

            ("testUpdateSharingGroupWorks", testUpdateSharingGroupWorks),
            ("testRemoveSharingGroupWorks", testRemoveSharingGroupWorks),
            ("testUpdateSharingGroupForDeletedSharingGroupFails", testUpdateSharingGroupForDeletedSharingGroupFails),
            ("testRemoveUserFromSharingGroup_lastUserInSharingGroup", testRemoveUserFromSharingGroup_lastUserInSharingGroup),
            ("testRemoveUserFromSharingGroup_notLastUserInSharingGroup", testRemoveUserFromSharingGroup_notLastUserInSharingGroup),
            ("testRemoveUserFromSharingGroup_failsWithBadMasterVersion",
                testRemoveUserFromSharingGroup_failsWithBadMasterVersion)
        ]
    }
    
