move index comparison (order agnostic) test from test_transtion to utils/testing; also add tests for index comparison