public async Task should_return_single_result_when_found() { const string objectId = "123"; const string objectName = "form"; var model = new LocalizationModel(); var cursor = new Mock <IAsyncCursor <LocalizationModel> >(); cursor.Setup(x => x.Current).Returns(new List <LocalizationModel> { model }); cursor.SetupSequence(x => x.MoveNext(It.IsAny <CancellationToken>())).Returns(true).Returns(false); StubFindAsync(cursor.Object); var response = await ExecuteEndpoint(_controller.Get(objectId, objectName)); response.Should().Be(model); }