@Test
public void testTransversal() {

    int size = 4;
    // Sym(n) : make the total symmetry group
    PermutationGroup group = PermutationGroup.makeSymN(size);
    // Aut(G) : make the automorphism group for a graph
    Permutation p1 = new Permutation(2, 1, 0, 3);
    Permutation p2 = new Permutation(0, 3, 2, 1);
    List<Permutation> generators = new ArrayList<Permutation>();
    generators.add(p1);
    generators.add(p2);
    PermutationGroup subgroup = new PermutationGroup(size, generators);
    // generate the traversal
    List<Permutation> transversal = group.transversal(subgroup);
    int subgroupOrder = (int) subgroup.order();
    int groupOrder = (int) group.order();
    int transversalSize = transversal.size();
    // check that |Aut(G)| / |Sym(N)| = |Transversal|
    Assert.assertEquals(factorial(size), groupOrder);
    Assert.assertEquals(groupOrder / subgroupOrder, transversalSize);
}