@Test
 public void collectByte() {
   ImmutableCollection<Integer> integers = this.classUnderTest();
   ImmutableByteCollection immutableCollection =
       integers.collectByte(PrimitiveFunctions.unboxIntegerToByte());
   Verify.assertSize(integers.size(), immutableCollection);
   Assert.assertEquals(integers, immutableCollection.collect(Integer::valueOf));
 }
Ejemplo n.º 2
0
 @Override
 @Test
 public void collectByte() {
   MutableBag<Integer> integers = UnmodifiableBag.of(HashBag.newBagWith(1, 2, 2, 3, 3, 3));
   Assert.assertEquals(
       ByteHashBag.newBagWith((byte) 1, (byte) 2, (byte) 2, (byte) 3, (byte) 3, (byte) 3),
       integers.collectByte(PrimitiveFunctions.unboxIntegerToByte()));
 }