Add unit test for sorting modal