Add unit test for reordered dms