### Question:
AssetSpliterator implements Spliterator<StorageAsset>, Closeable { @Override public boolean tryAdvance( Consumer<? super StorageAsset> action ) { try { StorageAsset asset = workList.getLast( ); consumeAsset( action, asset ); return true; } catch (NoSuchElementException e) { return false; } } AssetSpliterator( int splitThreshold, StorageAsset... assets);  AssetSpliterator( StorageAsset... assets); protected  AssetSpliterator(); protected  AssetSpliterator( int splitThreshold); protected  AssetSpliterator( int splitThreshold, Set<StorageAsset> visitedContainers); protected  AssetSpliterator( List<StorageAsset> baseList, Set<StorageAsset> visitedContainers); @Override void close( ); @Override boolean tryAdvance( Consumer<? super StorageAsset> action ); @Override void forEachRemaining( Consumer<? super StorageAsset> action ); @Override Spliterator<StorageAsset> trySplit( ); @Override long estimateSize( ); @Override int characteristics( ); static final int DEFAULT_SPLIT_THRESHOLD; }### Answer:
@Test void tryAdvance( ) { StorageAsset root = createTree( ); AssetSpliterator spliterator = new AssetSpliterator( root ); final ConsumeVisitStatus status = new ConsumeVisitStatus( ); StorageAsset expectedTarget = root.list( ).get( 0 ).list( ).get( 0 ).list( ).get( 0 ); spliterator.tryAdvance( status ); assertEquals( 1, status.size( ) ); assertEquals( expectedTarget, status.getLast( ) ); spliterator.tryAdvance( status ); assertEquals( 2, status.size( ) ); expectedTarget = root.list( ).get( 0 ).list( ).get( 0 ).list( ).get( 1 ); assertEquals( expectedTarget, status.getLast( ) ); }