public void HandleScopeThreadCollision_AddsInstance_Twice_SameKey() { //ARRANGE var scope = new Scoped(new Container()); var instance = new object(); //ACT scope.HandleScopeThreadCollision(instance, typeof(object)); scope.HandleScopeThreadCollision(instance, typeof(object)); var result = scope.GetOrAddScopedInstance <object>(scoped => throw new NotImplementedException(), typeof(object)); //ASSERT Assert.Same(instance, result); }