@Test
public void toIntArray() {

    IntSet emptySet = new BitSetIntSet();
    int[] emptyArr = emptySet.toIntArray();
    assertThat(emptyArr.length, is(0));
    IntSet withGapsSet = new BitSetIntSet(100, Arrays.asList(43, 23, 53));
    int[] arr = withGapsSet.toIntArray();
    assertThat(arr.length, is(3));
    assertThat(arr[0], is(23));
    assertThat(arr[1], is(43));
    assertThat(arr[2], is(53));
}