Add mode sorting test