@Test public void collectInt() { ImmutableCollection<Integer> integers = this.classUnderTest(); ImmutableIntCollection immutableCollection = integers.collectInt(PrimitiveFunctions.unboxIntegerToInt()); Verify.assertSize(integers.size(), immutableCollection); Assert.assertEquals(integers, immutableCollection.collect(Integer::valueOf)); }
@Override @Test public void collectInt() { MutableBag<Integer> integers = UnmodifiableBag.of(HashBag.newBagWith(1, 2, 2, 3, 3, 3)); Assert.assertEquals( IntHashBag.newBagWith(1, 2, 2, 3, 3, 3), integers.collectInt(PrimitiveFunctions.unboxIntegerToInt())); }