### Question:
CountsStoreTransactionApplier extends TransactionApplier.Adapter { @Override public boolean visitNodeCountsCommand( Command.NodeCountsCommand command ) { assert countsUpdater != null || mode == TransactionApplicationMode.RECOVERY : "You must call begin first"; haveUpdates = true; if ( countsUpdater != null ) { countsUpdater.incrementNodeCount( command.labelId(), command.delta() ); } return false; } CountsStoreTransactionApplier( TransactionApplicationMode mode, CountsAccessor.Updater countsUpdater ); @Override void close(); @Override boolean visitNodeCountsCommand( Command.NodeCountsCommand command ); @Override boolean visitRelationshipCountsCommand( Command.RelationshipCountsCommand command ); @Override boolean visitSchemaRuleCommand( SchemaRuleCommand command );  }### Answer:
@Test public void shouldNotifyCacheAccessOnHowManyUpdatesOnCountsWeHadSoFar() throws Exception { final CountsTracker tracker = mock( CountsTracker.class ); final CountsAccessor.Updater updater = mock( CountsAccessor.Updater.class ); when( tracker.apply( anyLong() ) ).thenReturn( Optional.of( updater ) ); final CountsStoreBatchTransactionApplier applier = new CountsStoreBatchTransactionApplier( tracker, TransactionApplicationMode.INTERNAL ); try ( TransactionApplier txApplier = applier.startTx( new TransactionToApply( null, 2L ) ) ) { txApplier.visitNodeCountsCommand( new Command.NodeCountsCommand( StatementConstants.ANY_LABEL, 1 ) ); } verify( updater, times( 1 ) ).incrementNodeCount( StatementConstants.ANY_LABEL, 1 ); }