Skip to content

Commit

Permalink
minor refactor in test
Browse files Browse the repository at this point in the history
  • Loading branch information
esaulpaugh committed Sep 5, 2024
1 parent decda12 commit 185a6be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/test/java/com/esaulpaugh/headlong/rlp/RLPStreamTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.Callable;
import java.util.concurrent.CyclicBarrier;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static com.esaulpaugh.headlong.rlp.RLPDecoder.RLP_STRICT;
Expand Down Expand Up @@ -158,7 +157,7 @@ public void testCopyToRLPOutputStream() throws IOException {
public void testStreamEasy() throws Throwable {
RLPItem[] collected = RLPDecoderTest.collectAll(RLP_BYTES).toArray(RLPItem.EMPTY_ARRAY);
Stream<RLPItem> stream = RLPDecoder.stream(RLP_STRICT.sequenceIterator(RLP_BYTES, 0));
RLPItem[] streamed = stream.collect(Collectors.toList()).toArray(RLPItem.EMPTY_ARRAY);
RLPItem[] streamed = stream.toArray(RLPItem[]::new);

assertTrue(Arrays.deepEquals(collected, streamed));

Expand Down

0 comments on commit 185a6be

Please sign in to comment.