public void poll() { InitializeDocumentDescriptor command = null; _commandBus.When(c => c.Send(Arg.Any <InitializeDocumentDescriptor>(), Arg.Any <string>())) .Do(callInfo => command = (InitializeDocumentDescriptor)callInfo.Args()[0]); _queue.PollFileSystem(); // asserts _blobstore.Received().Upload(Arg.Is(_originalFormat), Arg.Any <FileNameWithExtension>(), Arg.Any <Stream>()); Assert.NotNull(command); Assert.AreEqual(_blobId, command.BlobId); Assert.NotNull(command.HandleInfo); Assert.AreEqual(_documentHandle, command.HandleInfo.Handle); }