### Question:
UpdateRecordsStep extends ProcessorStep<RECORD[]> implements StatsProvider { @Override protected void process( RECORD[] batch, BatchSender sender ) { LongFunction<IdSequence> idSequence = prepareIdSequence.apply( store ); int recordsUpdatedInThisBatch = 0; for ( RECORD record : batch ) { if ( record != null && record.inUse() && !IdValidator.isReservedId( record.getId() ) ) { store.prepareForCommit( record, idSequence.apply( record.getId() ) ); store.updateRecord( record ); recordsUpdatedInThisBatch++; } } recordsUpdated.add( recordsUpdatedInThisBatch ); } UpdateRecordsStep( StageControl control, Configuration config, RecordStore<RECORD> store,
            PrepareIdSequence prepareIdSequence ); @Override Stat stat( Key key ); @Override Key[] keys();  }### Answer:
@Test public void recordWithReservedIdIsSkipped() { RecordStore<NodeRecord> store = mock( NodeStore.class ); StageControl stageControl = mock( StageControl.class ); UpdateRecordsStep<NodeRecord> step = new UpdateRecordsStep<>( stageControl, Configuration.DEFAULT, store, new StorePrepareIdSequence() ); NodeRecord node1 = new NodeRecord( 1 ); node1.setInUse( true ); NodeRecord node2 = new NodeRecord( 2 ); node2.setInUse( true ); NodeRecord nodeWithReservedId = new NodeRecord( IdGeneratorImpl.INTEGER_MINUS_ONE ); NodeRecord[] batch = {node1, node2, nodeWithReservedId}; step.process( batch, mock( BatchSender.class ) ); verify( store ).prepareForCommit( eq( node1 ), any( IdSequence.class ) ); verify( store ).updateRecord( node1 ); verify( store ).prepareForCommit( eq( node2 ), any( IdSequence.class ) ); verify( store ).updateRecord( node2 ); verify( store, never() ).prepareForCommit( eq( nodeWithReservedId ), any( IdSequence.class ) ); verify( store, never() ).updateRecord( nodeWithReservedId ); }