Add unit test for Api and Permutation class