@Test
public void testResize() throws Exception {

    Combinations combinations = Combinations.newInstance(2)
            .resize(asList(2, 2))
            .resize(asList(3, 3));
    List<int[]> tuples = take(combinations, 9);
    assertThat(tuples.get(0)).isIn(COMBINATIONS_2x2);
    assertThat(tuples.get(1)).isIn(COMBINATIONS_2x2);
    assertThat(tuples).containsAll(COMBINATIONS_3x3);
}