-
Notifications
You must be signed in to change notification settings - Fork 587
/
abstractImmutablePrimitiveListTestCase.stg
504 lines (452 loc) · 21.9 KB
/
abstractImmutablePrimitiveListTestCase.stg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
import "copyrightAndOthers.stg"
import "primitiveLiteral.stg"
isTest() ::= "true"
targetPath() ::= "org/eclipse/collections/impl/list/immutable/primitive"
fileName(primitive) ::= "AbstractImmutable<primitive.name>ListTestCase"
class(primitive) ::= <<
<body(primitive.type, primitive.wrapperName, primitive.name)>
>>
body(type, wrapperName, name) ::= <<
<copyrightAndOthers()>
package org.eclipse.collections.impl.list.immutable.primitive;
import org.eclipse.collections.api.iterator.<name>Iterator;
import org.eclipse.collections.api.list.ImmutableList;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.list.primitive.Immutable<name>List;
import org.eclipse.collections.api.list.primitive.Mutable<name>List;
<if(!primitive.intPrimitive)>import org.eclipse.collections.api.tuple.primitive.<name>IntPair;<endif>
import org.eclipse.collections.api.tuple.primitive.<name><name>Pair;
import org.eclipse.collections.api.tuple.primitive.<name>ObjectPair;
import org.eclipse.collections.impl.collection.immutable.primitive.AbstractImmutable<name>CollectionTestCase;
import org.eclipse.collections.impl.factory.Lists;
<if(!primitive.intPrimitive)>import org.eclipse.collections.impl.factory.primitive.<name>Lists;<endif>
import org.eclipse.collections.impl.factory.primitive.IntLists;
<if(!primitive.intPrimitive)>import org.eclipse.collections.impl.factory.primitive.<name>Sets;<endif>
import org.eclipse.collections.impl.factory.primitive.IntSets;
import org.eclipse.collections.impl.list.mutable.FastList;
import org.eclipse.collections.impl.list.mutable.primitive.<name>ArrayList;
import org.eclipse.collections.impl.math.Mutable<wrapperName>;
import org.eclipse.collections.impl.test.Verify;
import org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples;
import org.junit.Assert;
import org.junit.Test;
<if(primitive.specializedStream)>
import java.util.stream.Collectors;
import java.util.Arrays;
import java.util.Collections;<endif>
/**
* Abstract JUnit test for {@link Immutable<name>List}.
* This file was automatically generated from template file abstractImmutablePrimitiveListTestCase.stg.
*/
public abstract class AbstractImmutable<name>ListTestCase extends AbstractImmutable<name>CollectionTestCase
{
@Override
protected abstract Immutable<name>List classUnderTest();
@Override
protected Immutable<name>List newWith(<type>... elements)
{
return <name>Lists.immutable.of(elements);
}
@Override
protected Mutable<name>List newMutableCollectionWith(<type>... elements)
{
return <name>ArrayList.newListWith(elements);
}
@Override
protected MutableList\<<wrapperName>\> newObjectCollectionWith(<wrapperName>... elements)
{
return FastList.newListWith(elements);
}
@Test
public void get()
{
Immutable<name>List list = this.classUnderTest();
for (int i = 0; i \< list.size(); i++)
{
Assert.assertEquals(i + 1, list.get(i)<(wideDelta.(type))>);
}
}
@Test(expected = IndexOutOfBoundsException.class)
public void get_throws_index_greater_than_size()
{
this.classUnderTest().get(this.classUnderTest().size());
}
@Test(expected = IndexOutOfBoundsException.class)
public void get_throws_index_negative()
{
this.classUnderTest().get(-1);
}
@Test
public void getFirst()
{
Assert.assertEquals(<(wideLiteral.(type))("1")>, this.classUnderTest().getFirst()<(wideDelta.(type))>);
}
@Test
public void getLast()
{
Immutable<name>List list = this.classUnderTest();
Assert.assertEquals(list.size(), list.getLast()<(wideDelta.(type))>);
}
@Test
public void indexOf()
{
Immutable<name>List list = this.classUnderTest();
for (int i = 0; i \< list.size(); i++)
{
Assert.assertEquals(i, list.indexOf(<(castIntToNarrowTypeWithParens.(type))("i + 1")>));
}
Assert.assertEquals(-1L, list.indexOf(<(castIntToNarrowTypeWithParens.(type))("list.size() + 1")>)<(wideDelta.(type))>);
Immutable<name>List arrayList = this.newWith(<["1", "2", "1"]:(literal.(type))(); separator=", ">);
Assert.assertEquals(0L, arrayList.indexOf(<(literal.(type))("1")>));
Assert.assertEquals(1L, arrayList.indexOf(<(literal.(type))("2")>));
Assert.assertEquals(-1L, arrayList.indexOf(<(literal.(type))("9")>));
}
@Test
public void lastIndexOf()
{
Immutable<name>List list = this.classUnderTest();
for (int i = 0; i \< list.size(); i++)
{
Assert.assertEquals(i, list.lastIndexOf(<(castIntToNarrowTypeWithParens.(type))("i + 1")>));
}
Assert.assertEquals(-1L, list.lastIndexOf(<(castIntToNarrowTypeWithParens.(type))("list.size() + 1")>)<(wideDelta.(type))>);
Immutable<name>List arrayList = this.newWith(<["1", "2", "1"]:(literal.(type))(); separator=", ">);
Assert.assertEquals(2L, arrayList.lastIndexOf(<(literal.(type))("1")>));
Assert.assertEquals(1L, arrayList.lastIndexOf(<(literal.(type))("2")>));
Assert.assertEquals(-1L, arrayList.lastIndexOf(<(literal.(type))("9")>));
}
@Override
@Test
public void <type>Iterator()
{
<name>Iterator iterator = this.classUnderTest().<type>Iterator();
for (int i = 0; iterator.hasNext(); i++)
{
Assert.assertEquals(i + 1, iterator.next()<(wideDelta.(type))>);
}
Assert.assertFalse(iterator.hasNext());
}
@Test(expected = UnsupportedOperationException.class)
public void subList()
{
this.classUnderTest().subList(0, 1);
}
@Override
@Test
public void toArray()
{
super.toArray();
Immutable<name>List list = this.classUnderTest();
<type>[] array = list.toArray();
Assert.assertEquals(list.size(), array.length);
for (int i = 0; i \< list.size(); i++)
{
Assert.assertEquals(list.get(i), array[i]<(wideDelta.(type))>);
}
}
@Override
@Test
public void injectInto()
{
super.injectInto();
Immutable<name>List iterable = this.newWith(<["1", "2", "3"]:(literal.(type))(); separator=", ">);
Mutable<wrapperName> result = iterable.injectInto(new Mutable<wrapperName>(<(literal.(type))("0")>), Mutable<wrapperName>::add);
Assert.assertEquals(new Mutable<wrapperName>(<(literal.(type))("6")>), result);
}
@Test
public void injectIntoWithIndex()
{
Immutable<name>List list1 = this.newWith(<["1", "2", "3"]:(literal.(type))(); separator=", ">);
Immutable<name>List list2 = this.newWith(<["1", "2", "3"]:(literal.(type))(); separator=", ">);
Mutable<wrapperName> result = list1.injectIntoWithIndex(new Mutable<wrapperName>(<(literal.(type))("0")>),
(Mutable<wrapperName> object, <type> value, int index) -> object.add(<(castIntToNarrowTypeWithParens.(type))("value * list2.get(index)")>));
Assert.assertEquals(new Mutable<wrapperName>(<(literal.(type))("14")>), result);
}
/**
* @since 11.1.
*/
@Test
public void selectWithIndex()
{
Immutable<name>List list = this.newWith(<["3", "1", "9", "7"]:(literal.(type))(); separator=", ">);
Immutable<name>List selected = list.selectWithIndex((value, i) -> i % 2 == 0);
Assert.assertEquals(<name>Lists.immutable.with(<["3", "9"]:(literal.(type))(); separator=", ">), selected);
}
/**
* @since 11.1.
*/
@Test
public void selectWithIndexWithTarget()
{
Immutable<name>List list = this.newWith(<["3", "1", "9", "7"]:(literal.(type))(); separator=", ">);
Mutable<name>List selected = list.selectWithIndex((value, i) -> i % 2 == 0, <name>Lists.mutable.empty());
Assert.assertEquals(<name>Lists.immutable.with(<["3", "9"]:(literal.(type))(); separator=", ">), selected);
}
/**
* @since 11.1.
*/
@Test
public void rejectWithIndex()
{
Immutable<name>List list = this.newWith(<["3", "1", "9", "7"]:(literal.(type))(); separator=", ">);
Immutable<name>List rejected = list.rejectWithIndex((value, i) -> i % 2 == 0);
Assert.assertEquals(<name>Lists.immutable.with(<["1", "7"]:(literal.(type))(); separator=", ">), rejected);
}
/**
* @since 11.1.
*/
@Test
public void rejectWithIndexWithTarget()
{
Immutable<name>List list = this.newWith(<["3", "1", "9", "7"]:(literal.(type))(); separator=", ">);
Mutable<name>List rejected = list.rejectWithIndex((value, i) -> i % 2 == 0, <name>Lists.mutable.empty());
Assert.assertEquals(<name>Lists.immutable.with(<["1", "7"]:(literal.(type))(); separator=", ">), rejected);
}
/**
* @since 9.1.
*/
@Test
public void collectWithIndex()
{
ImmutableList\<<name>IntPair> pairs = this.newWith(<["3", "1", "9", "7"]:(literal.(type))(); separator=", ">)
.collectWithIndex(PrimitiveTuples::pair);
Assert.assertEquals(
IntLists.mutable.with(0, 1, 2, 3),
pairs.collectInt(<name>IntPair::getTwo, IntLists.mutable.empty()));
Assert.assertEquals(
<name>Lists.mutable.with(<["3", "1", "9", "7"]:(literal.(type))(); separator=", ">),
pairs.collect<name>(<name>IntPair::getOne, <name>Lists.mutable.empty()));
}
/**
* @since 9.1.
*/
@Test
public void collectWithIndexWithTarget()
{
MutableList\<<name>IntPair> pairs = this.newWith(<["3", "1", "9", "7"]:(literal.(type))(); separator=", ">)
.collectWithIndex(PrimitiveTuples::pair, Lists.mutable.empty());
Assert.assertEquals(
IntLists.mutable.with(0, 1, 2, 3),
pairs.collectInt(<name>IntPair::getTwo, IntLists.mutable.empty()));
Assert.assertEquals(
<name>Lists.mutable.with(<["3", "1", "9", "7"]:(literal.(type))(); separator=", ">),
pairs.collect<name>(<name>IntPair::getOne, <name>Lists.mutable.empty()));
Assert.assertEquals(
IntSets.mutable.with(0, 1, 2, 3),
pairs.collectInt(<name>IntPair::getTwo, IntSets.mutable.empty()));
Assert.assertEquals(
<name>Sets.mutable.with(<["3", "1", "9", "7"]:(literal.(type))(); separator=", ">),
pairs.collect<name>(<name>IntPair::getOne, <name>Sets.mutable.empty()));
}
@Test
public void distinct()
{
Immutable<name>List list1 = this.newWith(<["1", "2", "2", "3", "3", "3", "4", "4", "4", "4"]:(literal.(type))(); separator=", ">).distinct();
Immutable<name>List list2 = this.newWith(<["1", "2", "3", "4"]:(literal.(type))(); separator=", ">);
Assert.assertEquals(list1, list2);
}
@Test
public void toReversed()
{
Assert.assertEquals(Immutable<name>ArrayList.newListWith(<(literal.(type))("3")>, <(literal.(type))("1")>, <(literal.(type))("9")>, <(literal.(type))("7")>), this.newWith(<(literal.(type))("7")>, <(literal.(type))("9")>, <(literal.(type))("1")>, <(literal.(type))("3")>).toReversed());
Immutable<name>List list1 = this.newWith(<(literal.(type))("3")>, <(literal.(type))("1")>, <(literal.(type))("9")>, <(literal.(type))("7")>);
Assert.assertNotSame(list1, list1.toReversed());
Assert.assertEquals(<name>ArrayList.newListWith(<(literal.(type))("3")>, <(literal.(type))("1")>, <(literal.(type))("9")>, <(literal.(type))("7")>, <(literal.(type))("8")>), this.newWith(<(literal.(type))("8")>, <(literal.(type))("7")>, <(literal.(type))("9")>, <(literal.(type))("1")>, <(literal.(type))("3")>).toReversed());
Immutable<name>List list2 = this.newWith(<(literal.(type))("3")>, <(literal.(type))("1")>, <(literal.(type))("9")>, <(literal.(type))("7")>, <(literal.(type))("8")>);
Assert.assertNotSame(list2, list2.toReversed());
}
@Test
public void forEachWithIndex()
{
<wideType.(type)>[] sum = new <wideType.(type)>[1];
this.classUnderTest().forEachWithIndex((<type> each, int index) -> sum[0] += each + index);
Assert.assertEquals(<(wideLiteral.(type))("9")>, sum[0]<wideDelta.(type)>);
}
@Override
@Test
public void testEquals()
{
super.testEquals();
Immutable<name>List list1 = this.newWith(<["1", "2", "3", "4"]:(literal.(type))(); separator=", ">);
Immutable<name>List list2 = this.newWith(<["4", "3", "2", "1"]:(literal.(type))(); separator=", ">);
Assert.assertNotEquals(list1, list2);
}
@Override
@Test
public void testToString()
{
super.testToString();
StringBuilder expectedString = new StringBuilder("[");
int size = this.classUnderTest().size();
for (<type> each = 0; each \< size; each++)
{
expectedString.append(<(castFromIntWithParens.(type))({each + <(literal.(type))("1")>})>);
expectedString.append(<(castRealTypeToInt.(type))("each")> == size - 1 ? "" : ", ");
}
expectedString.append(']');
Assert.assertEquals(expectedString.toString(), this.classUnderTest().toString());
}
@Override
@Test
public void makeString()
{
super.makeString();
Immutable<name>List list = this.classUnderTest();
StringBuilder expectedString = new StringBuilder();
StringBuilder expectedString1 = new StringBuilder();
int size = list.size();
for (<type> each = 0; each \< size; each++)
{
expectedString.append(<(castFromIntWithParens.(type))({each + <(literal.(type))("1")>})>);
expectedString1.append(<(castFromIntWithParens.(type))({each + <(literal.(type))("1")>})>);
expectedString.append(<(castRealTypeToInt.(type))("each")> == size - 1 ? "" : ", ");
expectedString1.append(<(castRealTypeToInt.(type))("each")> == size - 1 ? "" : "/");
}
Assert.assertEquals(expectedString.toString(), list.makeString());
Assert.assertEquals(expectedString1.toString(), list.makeString("/"));
Assert.assertEquals(this.classUnderTest().toString(), this.classUnderTest().makeString("[", ", ", "]"));
}
@Override
@Test
public void appendString()
{
super.appendString();
StringBuilder expectedString = new StringBuilder();
StringBuilder expectedString1 = new StringBuilder();
int size = this.classUnderTest().size();
for (<type> each = 0; each \< size; each++)
{
expectedString.append(<(castFromIntWithParens.(type))({each + <(literal.(type))("1")>})>);
expectedString1.append(<(castFromIntWithParens.(type))({each + <(literal.(type))("1")>})>);
expectedString.append(<(castRealTypeToInt.(type))("each")> == size - 1 ? "" : ", ");
expectedString1.append(<(castRealTypeToInt.(type))("each")> == size - 1 ? "" : "/");
}
Immutable<name>List list = this.classUnderTest();
StringBuilder appendable2 = new StringBuilder();
list.appendString(appendable2);
Assert.assertEquals(expectedString.toString(), appendable2.toString());
StringBuilder appendable3 = new StringBuilder();
list.appendString(appendable3, "/");
Assert.assertEquals(expectedString1.toString(), appendable3.toString());
StringBuilder appendable4 = new StringBuilder();
this.classUnderTest().appendString(appendable4, "[", ", ", "]");
Assert.assertEquals(this.classUnderTest().toString(), appendable4.toString());
}
@Override
@Test
public void toList()
{
super.toList();
Immutable<name>List immutableList = this.classUnderTest();
Mutable<name>List list = immutableList.toList();
Verify.assertEqualsAndHashCode(immutableList, list);
Assert.assertNotSame(immutableList, list);
}
@Test
public void zip<name>()
{
Immutable<name>List list1 = this.newWith(<["1", "2", "3"]:(literal.(type))(); separator=", ">);
Immutable<name>List list2 = this.newWith(<["1"]:(literal.(type))(); separator=", ">);
ImmutableList\<<name><name>Pair> zipSame = list1.zip<name>(list1);
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<["1", "1"]:(literal.(type))(); separator=", ">),
PrimitiveTuples.pair(<["2", "2"]:(literal.(type))(); separator=", ">),
PrimitiveTuples.pair(<["3", "3"]:(literal.(type))(); separator=", ">)),
zipSame);
ImmutableList\<<name><name>Pair> zipSameLazy = list1.zip<name>(list1.asLazy());
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<["1", "1"]:(literal.(type))(); separator=", ">),
PrimitiveTuples.pair(<["2", "2"]:(literal.(type))(); separator=", ">),
PrimitiveTuples.pair(<["3", "3"]:(literal.(type))(); separator=", ">)),
zipSameLazy);
ImmutableList\<<name><name>Pair> zipLess = list1.zip<name>(list2);
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<["1", "1"]:(literal.(type))(); separator=", ">)),
zipLess);
ImmutableList\<<name><name>Pair> zipLessLazy = list1.zip<name>(list2.asLazy());
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<["1", "1"]:(literal.(type))(); separator=", ">)),
zipLessLazy);
ImmutableList\<<name><name>Pair> zipMore = list2.zip<name>(list1);
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<["1", "1"]:(literal.(type))(); separator=", ">)),
zipMore);
ImmutableList\<<name><name>Pair> zipMoreLazy = list2.zip<name>(list1.asLazy());
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<["1", "1"]:(literal.(type))(); separator=", ">)),
zipMoreLazy);
ImmutableList\<<name><name>Pair> zipEmpty1 = list1.zip<name>(this.newWith());
Assert.assertTrue(zipEmpty1.isEmpty());
ImmutableList\<<name><name>Pair> zipEmpty2 = this.newWith().zip<name>(list1);
Assert.assertTrue(zipEmpty2.isEmpty());
}
@Test
public void zip()
{
Immutable<name>List list1 = this.newWith(<["1", "2", "3"]:(literal.(type))(); separator=", ">);
Immutable<name>List list2 = this.newWith(<["1"]:(literal.(type))(); separator=", ">);
ImmutableList\<String> list3 = Lists.immutable.with("1", "2", "3");
ImmutableList\<String> list4 = Lists.immutable.with("1");
ImmutableList\<<name>ObjectPair\<String\>> zipSame = list1.zip(list3);
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<(literal.(type))("1")>, "1"),
PrimitiveTuples.pair(<(literal.(type))("2")>, "2"),
PrimitiveTuples.pair(<(literal.(type))("3")>, "3")),
zipSame);
ImmutableList\<<name>ObjectPair\<String\>> zipSameLazy = list1.zip(list3.asLazy());
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<(literal.(type))("1")>, "1"),
PrimitiveTuples.pair(<(literal.(type))("2")>, "2"),
PrimitiveTuples.pair(<(literal.(type))("3")>, "3")),
zipSameLazy);
ImmutableList\<<name>ObjectPair\<String\>> zipLess = list1.zip(list4);
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<(literal.(type))("1")>, "1")),
zipLess);
ImmutableList\<<name>ObjectPair\<String\>> zipLessLazy = list1.zip(list4.asLazy());
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<(literal.(type))("1")>, "1")),
zipLessLazy);
ImmutableList\<<name>ObjectPair\<String\>> zipMore = list2.zip(list3);
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<(literal.(type))("1")>, "1")),
zipMore);
ImmutableList\<<name>ObjectPair\<String\>> zipMoreLazy = list2.zip(list3.asLazy());
Assert.assertEquals(
Lists.immutable.with(
PrimitiveTuples.pair(<(literal.(type))("1")>, "1")),
zipMoreLazy);
ImmutableList\<<name>ObjectPair\<String\>> zipEmpty1 = list1.zip(Lists.immutable.empty());
Assert.assertTrue(zipEmpty1.isEmpty());
ImmutableList\<<name>ObjectPair\<String\>> zipEmpty2 = this.newWith().zip(Lists.immutable.with("1", "2"));
Assert.assertTrue(zipEmpty2.isEmpty());
}
<if(primitive.specializedStream)>
@Test
public void stream()
{
Assert.assertEquals(Collections.emptyList(), <name>Lists.immutable.empty().primitiveStream().boxed().collect(Collectors.toList()));
Assert.assertEquals(Collections.singletonList(<(literal.(type))("1")>), this.newWith(<["1"]:(literal.(type))(); separator=", ">).primitiveStream().boxed().collect(Collectors.toList()));
Assert.assertEquals(Arrays.asList(<["1", "2", "3"]:(literal.(type))(); separator=", ">), Immutable<name>ArrayList.newListWith(<["1", "2", "3"]:(literal.(type))(); separator=", ">).primitiveStream().boxed().collect(Collectors.toList()));
}
@Test
public void parallelStream()
{
Assert.assertEquals(Collections.emptyList(), <name>Lists.immutable.empty().primitiveParallelStream().boxed().collect(Collectors.toList()));
Assert.assertEquals(Collections.singletonList(<(literal.(type))("1")>), this.newWith(<["1"]:(literal.(type))(); separator=", ">).primitiveParallelStream().boxed().collect(Collectors.toList()));
Assert.assertEquals(Arrays.asList(<["1", "2", "3"]:(literal.(type))(); separator=", ">), Immutable<name>ArrayList.newListWith(<["1", "2", "3"]:(literal.(type))(); separator=", ">).primitiveParallelStream().boxed().collect(Collectors.toList()));
}
<endif>
}
>>