Added unit test to ensure that permutations/rotations work as expected: