@Test
public void getTest() {

    int size = 6;
    // group that could represent a hexagon (numbered clockwise from top)
    // p1 = a flip across the vertical, p2 = flip across the horizontal
    Permutation p1 = new Permutation(0, 5, 4, 3, 2, 1);
    Permutation p2 = new Permutation(3, 2, 1, 0, 5, 4);
    List<Permutation> generators = new ArrayList<Permutation>();
    generators.add(p1);
    generators.add(p2);
    PermutationGroup group = new PermutationGroup(size, generators);
    // the permutations in U0 all have 0 in the orbit of i
    // but fixing 0 cannot fix 1, so there is no such perm
    int uIndex = 0;
    int uSubIndex = 1;
    Permutation u01 = group.get(uIndex, uSubIndex);
    Assert.assertNull(u01);
    // however, 0 and 3 are in the same orbit by both flips
    uSubIndex = 3;
    Permutation u03 = group.get(uIndex, uSubIndex);
    List<Integer> orbit = u03.getOrbit(0);
    Assert.assertTrue(orbit.contains(uSubIndex));
}