@Override
   public int[] toIntArray() {
      int[] array = new int[size];
      for (int i = 0; i < size; i++) {
         array[i] = i;
      }
      return array;
   }
@Test
   public void toIntArray() throws Exception {
      RangeSet rs = new RangeSet(4);
      int[] array = rs.toIntArray();
      assertArrayEquals(new int[]{0, 1, 2, 3}, array);
   }