@Test
 public void toArray() {
   ImmutableCollection<Integer> integers = this.classUnderTest();
   MutableList<Integer> copy = FastList.newList(integers);
   Assert.assertArrayEquals(integers.toArray(), copy.toArray());
   Assert.assertArrayEquals(
       integers.toArray(new Integer[integers.size()]), copy.toArray(new Integer[integers.size()]));
 }
 @Test
 public void detectIfNone() {
   ImmutableCollection<Integer> integers = this.classUnderTest();
   Function0<Integer> function = new PassThruFunction0<Integer>(integers.size() + 1);
   Assert.assertEquals(Integer.valueOf(1), integers.detectIfNone(Predicates.equal(1), function));
   Assert.assertEquals(
       Integer.valueOf(integers.size() + 1),
       integers.detectIfNone(Predicates.equal(integers.size() + 1), function));
 }
 @Test
 public void countWith() {
   ImmutableCollection<Integer> integers = this.classUnderTest();
   Assert.assertEquals(
       integers.size(), integers.countWith(Predicates2.instanceOf(), Integer.class));
   Assert.assertEquals(0, integers.countWith(Predicates2.instanceOf(), String.class));
 }
 @Test
 public void detectWith() {
   ImmutableCollection<Integer> integers = this.classUnderTest();
   Assert.assertEquals(
       Integer.valueOf(1), integers.detectWith(Predicates2.equal(), Integer.valueOf(1)));
   Assert.assertNull(
       integers.detectWith(Predicates2.equal(), Integer.valueOf(integers.size() + 1)));
 }
 @Test
 public void collectShort() {
   ImmutableCollection<Integer> integers = this.classUnderTest();
   ImmutableShortCollection immutableCollection =
       integers.collectShort(PrimitiveFunctions.unboxIntegerToShort());
   Verify.assertSize(integers.size(), immutableCollection);
   Assert.assertEquals(integers, immutableCollection.collect(Integer::valueOf));
 }
 @Test
 public void collectLong() {
   ImmutableCollection<Integer> integers = this.classUnderTest();
   ImmutableLongCollection immutableCollection =
       integers.collectLong(PrimitiveFunctions.unboxIntegerToLong());
   Verify.assertSize(integers.size(), immutableCollection);
   Assert.assertEquals(
       integers,
       immutableCollection.collect(longParameter -> Integer.valueOf((int) longParameter)));
 }
 @Test
 public void getLast() {
   ImmutableCollection<Integer> integers = this.classUnderTest();
   Assert.assertEquals(Integer.valueOf(integers.size()), integers.getLast());
 }
 @Test
 public void reject() {
   ImmutableCollection<Integer> integers = this.classUnderTest();
   Verify.assertIterableEmpty(integers.reject(Predicates.lessThan(integers.size() + 1)));
   Assert.assertEquals(integers, integers.reject(Predicates.greaterThan(integers.size())));
 }