Reformat code

This commit is contained in:
Grzegorz Piwowarek 2016-09-12 22:02:51 +02:00
parent 0c12104b83
commit d9a7757602
1 changed files with 9 additions and 9 deletions

View File

@ -57,7 +57,7 @@ public class ArrayListTest {
public void givenCollection_whenAddToArrayList_thenIsAdded() { public void givenCollection_whenAddToArrayList_thenIsAdded() {
List<Long> xs = new ArrayList<>(Arrays.asList(1L, 2L, 3L)); List<Long> xs = new ArrayList<>(Arrays.asList(1L, 2L, 3L));
LongStream.range(4, 10).boxed() LongStream.range(4, 10).boxed()
.collect(collectingAndThen(toList(), ys -> xs.addAll(0, ys))); .collect(collectingAndThen(toCollection(ArrayList::new), ys -> xs.addAll(0, ys)));
assertThat(Arrays.asList(4L, 5L, 6L, 7L, 8L, 9L, 1L, 2L, 3L), equalTo(xs)); assertThat(Arrays.asList(4L, 5L, 6L, 7L, 8L, 9L, 1L, 2L, 3L), equalTo(xs));
} }