public async Task should_return_existing_draft_copy() { var id = ObjectId.GenerateNewId(); var model = new LocalizationCopy { ObjectId = ObjectId.GenerateNewId().ToString(), ObjectName = ObjectName }; var cursor = StubCursor(); var form = new LocalizationModel { Id = id }; cursor.Setup(x => x.Current).Returns(new List <LocalizationModel> { form }); cursor.SetupSequence(x => x.MoveNext(It.IsAny <CancellationToken>())) .Returns(true) .Returns(true) .Returns(false); var response = await ExecuteEndpoint(_controller.Upsert(model)); _repository.Verify(x => x.SaveAsync( LocalizationController.CollectionName, It.IsAny <LocalizationModel>()), Times.Never); response.Should().Be(form); }