// Path: hppc/src/main/templates/com/carrotsearch/hppc/cursors/KTypeCursor.java
// public final class KTypeCursor<KType> {
//   /**
//    * The current value's index in the container this cursor belongs to. The
//    * meaning of this index is defined by the container (usually it will be an
//    * index in the underlying storage buffer).
//    */
//   public int index;
// 
//   /**
//    * The current value.
//    */
//   public KType value;
// 
//   @Override
//   public String toString() {
//     return "[cursor, index: " + index + ", value: " + value + "]";
//   }
// }
// 
// Path: hppc/src/main/templates/com/carrotsearch/hppc/predicates/KTypePredicate.java
// public interface KTypePredicate<KType> {
//   public boolean apply(KType value);
// }
// 
// Path: hppc/src/main/templates/com/carrotsearch/hppc/procedures/KTypeProcedure.java
// public interface KTypeProcedure<KType> {
//   public void apply(KType value);
// }
// 
// Path: hppc/src/test/java/com/carrotsearch/hppc/TestUtils.java
// public static void assertSortedListEquals(Object[] array, Object... elements) {
//   assertEquals(elements.length, array.length);
//   Arrays.sort(array);
//   assertArrayEquals(elements, array);
// }


import com.carrotsearch.hppc.cursors.KTypeCursor;
import com.carrotsearch.hppc.predicates.KTypePredicate;
import com.carrotsearch.hppc.procedures.KTypeProcedure;
import com.carrotsearch.randomizedtesting.RandomizedTest;
import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.Test;
import java.util.concurrent.atomic.AtomicInteger;
import static com.carrotsearch.hppc.TestUtils.assertSortedListEquals;
import static org.junit.Assert.*;
        KTypeWormSet<KType> l3 = new Sub();
        l2.addAll(l1);
        l3.addAll(l1);

        Assertions.assertThat(l2).isEqualTo(l3);
        Assertions.assertThat(l1).isNotEqualTo(l2);
    }
    
    /* */
    @Test
    public void testForEachPredicate()
    {
      final KTypeWormSet<KType> set = KTypeWormSet.from(keyE, k1, k2, k3);
      final KTypeWormSet<KType> other = new KTypeWormSet<>();
      set.forEach(new KTypePredicate<KType>() {
        @Override
        public boolean apply(KType value) {
          other.add(value);
          return true;
        }
      });
      Assertions.assertThat(other).isEqualTo(set);
    }
    
    /* */
    @Test
    public void testForEachProcedure()
    {
      final KTypeWormSet<KType> set = KTypeWormSet.from(keyE, k1, k2, k3);
      final KTypeWormSet<KType> other = new KTypeWormSet<>();
// Path: hppc/src/main/templates/com/carrotsearch/hppc/cursors/KTypeCursor.java
// public final class KTypeCursor<KType> {
//   /**
//    * The current value's index in the container this cursor belongs to. The
//    * meaning of this index is defined by the container (usually it will be an
//    * index in the underlying storage buffer).
//    */
//   public int index;
// 
//   /**
//    * The current value.
//    */
//   public KType value;
// 
//   @Override
//   public String toString() {
//     return "[cursor, index: " + index + ", value: " + value + "]";
//   }
// }
// 
// Path: hppc/src/main/templates/com/carrotsearch/hppc/predicates/KTypePredicate.java
// public interface KTypePredicate<KType> {
//   public boolean apply(KType value);
// }
// 
// Path: hppc/src/main/templates/com/carrotsearch/hppc/procedures/KTypeProcedure.java
// public interface KTypeProcedure<KType> {
//   public void apply(KType value);
// }
// 
// Path: hppc/src/test/java/com/carrotsearch/hppc/TestUtils.java
// public static void assertSortedListEquals(Object[] array, Object... elements) {
//   assertEquals(elements.length, array.length);
//   Arrays.sort(array);
//   assertArrayEquals(elements, array);
// }


// Path: hppc/src/test/templates/com/carrotsearch/hppc/KTypeWormSetTest.java
import com.carrotsearch.hppc.cursors.KTypeCursor;
import com.carrotsearch.hppc.predicates.KTypePredicate;
import com.carrotsearch.hppc.procedures.KTypeProcedure;
import com.carrotsearch.randomizedtesting.RandomizedTest;
import org.assertj.core.api.Assertions;
import org.junit.Before;
import org.junit.Test;
import java.util.concurrent.atomic.AtomicInteger;
import static com.carrotsearch.hppc.TestUtils.assertSortedListEquals;
import static org.junit.Assert.*;

        KTypeWormSet<KType> l3 = new Sub();
        l2.addAll(l1);
        l3.addAll(l1);

        Assertions.assertThat(l2).isEqualTo(l3);
        Assertions.assertThat(l1).isNotEqualTo(l2);
    }
    
    /* */
    @Test
    public void testForEachPredicate()
    {
      final KTypeWormSet<KType> set = KTypeWormSet.from(keyE, k1, k2, k3);
      final KTypeWormSet<KType> other = new KTypeWormSet<>();
      set.forEach(new KTypePredicate<KType>() {
        @Override
        public boolean apply(KType value) {
          other.add(value);
          return true;
        }
      });
      Assertions.assertThat(other).isEqualTo(set);
    }
    
    /* */
    @Test
    public void testForEachProcedure()
    {
      final KTypeWormSet<KType> set = KTypeWormSet.from(keyE, k1, k2, k3);
      final KTypeWormSet<KType> other = new KTypeWormSet<>();
      set.forEach(new KTypeProcedure<KType>() {