@@ -19,9 +19,9 @@ public class ArrayListTest {
1919 @ Before
2020 public void setUp () {
2121 List <String > xs = LongStream .range (0 , 16 )
22- .boxed ()
23- .map (Long ::toHexString )
24- .collect (toCollection (ArrayList ::new ));
22+ .boxed ()
23+ .map (Long ::toHexString )
24+ .collect (toCollection (ArrayList ::new ));
2525 stringsToSearch = new ArrayList <>(xs );
2626 stringsToSearch .addAll (xs );
2727 }
@@ -35,7 +35,7 @@ public void givenNewArrayList_whenCheckCapacity_thenDefaultValue() {
3535 @ Test
3636 public void givenCollection_whenProvideItToArrayListCtor_thenArrayListIsPopulatedWithItsElements () {
3737 Collection <Integer > numbers =
38- IntStream .range (0 , 10 ).boxed ().collect (toSet ());
38+ IntStream .range (0 , 10 ).boxed ().collect (toSet ());
3939
4040 List <Integer > xs = new ArrayList <>(numbers );
4141 assertEquals (10 , xs .size ());
@@ -57,7 +57,7 @@ public void givenElement_whenAddToArrayList_thenIsAdded() {
5757 public void givenCollection_whenAddToArrayList_thenIsAdded () {
5858 List <Long > xs = new ArrayList <>(Arrays .asList (1L , 2L , 3L ));
5959 LongStream .range (4 , 10 ).boxed ()
60- .collect (collectingAndThen (toList ( ), ys -> xs .addAll (0 , ys )));
60+ .collect (collectingAndThen (toCollection ( ArrayList :: new ), ys -> xs .addAll (0 , ys )));
6161
6262 assertThat (Arrays .asList (4L , 5L , 6L , 7L , 8L , 9L , 1L , 2L , 3L ), equalTo (xs ));
6363 }
@@ -89,9 +89,9 @@ public void givenPredicate_whenIterateArrayList_thenFindAllElementsSatisfyingPre
8989 Set <String > matchingStrings = new HashSet <>(Arrays .asList ("a" , "c" , "9" ));
9090
9191 List <String > result = stringsToSearch
92- .stream ()
93- .filter (matchingStrings ::contains )
94- .collect (toCollection (ArrayList ::new ));
92+ .stream ()
93+ .filter (matchingStrings ::contains )
94+ .collect (toCollection (ArrayList ::new ));
9595
9696 assertEquals (6 , result .size ());
9797 }
@@ -132,7 +132,7 @@ public void givenListIterator_whenReverseTraversal_thenRetrieveElementsInOpposit
132132 @ Test
133133 public void givenCondition_whenIterateArrayList_thenRemoveAllElementsSatisfyingCondition () {
134134 Set <String > matchingStrings
135- = Sets .newHashSet ("a" , "b" , "c" , "d" , "e" , "f" );
135+ = Sets .newHashSet ("a" , "b" , "c" , "d" , "e" , "f" );
136136
137137 Iterator <String > it = stringsToSearch .iterator ();
138138 while (it .hasNext ()) {
0 commit comments