//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldProvideLabelScanStoreUpdatesSortedByNodeId() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldProvideLabelScanStoreUpdatesSortedByNodeId()
        {
            // GIVEN
            IndexingService indexing = mock(typeof(IndexingService));

            when(indexing.ConvertToIndexUpdates(any(), eq(EntityType.NODE))).thenAnswer(o => Iterables.empty());
            LabelScanWriter writer = new OrderVerifyingLabelScanWriter(10, 15, 20);
            WorkSync <System.Func <LabelScanWriter>, LabelUpdateWork> labelScanSync    = spy(new WorkSync <System.Func <LabelScanWriter>, LabelUpdateWork>(SingletonProvider(writer)));
            WorkSync <IndexingUpdateService, IndexUpdatesWork>        indexUpdatesSync = new WorkSync <IndexingUpdateService, IndexUpdatesWork>(indexing);
            TransactionToApply tx            = mock(typeof(TransactionToApply));
            PropertyStore      propertyStore = mock(typeof(PropertyStore));

            using (IndexBatchTransactionApplier applier = new IndexBatchTransactionApplier(indexing, labelScanSync, indexUpdatesSync, mock(typeof(NodeStore)), mock(typeof(RelationshipStore)), propertyStore, new IndexActivator(indexing)))
            {
                using (TransactionApplier txApplier = applier.StartTx(tx))
                {
                    // WHEN
                    txApplier.VisitNodeCommand(Node(15));
                    txApplier.VisitNodeCommand(Node(20));
                    txApplier.VisitNodeCommand(Node(10));
                }
            }
            // THEN all assertions happen inside the LabelScanWriter#write and #close
            verify(labelScanSync).applyAsync(any());
        }