### Question:
NativeLabelScanReader implements LabelScanReader { @Override public PrimitiveLongResourceIterator nodesWithLabel( int labelId ) { RawCursor<Hit<LabelScanKey,LabelScanValue>,IOException> cursor; try { cursor = seekerForLabel( 0, labelId ); openCursors.add( cursor ); } catch ( IOException e ) { throw new UncheckedIOException( e ); } return new LabelScanValueIterator( cursor, openCursors, NO_ID ); } NativeLabelScanReader( GBPTree<LabelScanKey,LabelScanValue> index ); @Override void close(); @Override PrimitiveLongResourceIterator nodesWithLabel( int labelId ); @Override PrimitiveLongResourceIterator nodesWithAnyOfLabels( long fromId, int... labelIds ); @Override PrimitiveLongResourceIterator nodesWithAllLabels( int... labelIds ); @Override void nodesWithLabel( IndexProgressor.NodeLabelClient client, int labelId );  }### Answer:
@SuppressWarnings( "unchecked" ) @Test public void shouldFindMultipleNodesInEachRange() throws Exception { GBPTree<LabelScanKey,LabelScanValue> index = mock( GBPTree.class ); RawCursor<Hit<LabelScanKey,LabelScanValue>,IOException> cursor = mock( RawCursor.class ); when( cursor.next() ).thenReturn( true, true, true, false ); when( cursor.get() ).thenReturn( hit( 0, 0b1000_1000__1100_0010L ), hit( 1, 0b0000_0010__0000_1000L ), hit( 3, 0b0010_0000__1010_0001L ), null ); when( index.seek( any( LabelScanKey.class ), any( LabelScanKey.class ) ) ) .thenReturn( cursor ); try ( NativeLabelScanReader reader = new NativeLabelScanReader( index ) ) { LongIterator iterator = reader.nodesWithLabel( LABEL_ID ); assertArrayEquals( new long[] { 1, 6, 7, 11, 15, 64 + 3, 64 + 9, 192 + 0, 192 + 5, 192 + 7, 192 + 13 }, asArray( iterator ) ); } }