@Test
public void toPermutationTest() {

    int size = 5;
    Partition partition = new Partition();
    for (int i = 0; i < size; i++) {
        partition.addSingletonCell(i);
    }
    Permutation permutation = partition.toPermutation();
    Assert.assertEquals(size, permutation.size());
    for (int i = 0; i < size; i++) {
        Assert.assertEquals(i, permutation.get(i));
    }
}