sort works with comparators and junit tests