@@ -0,0 +1,1715 @@
+package org.talend.dataprep.util;%0A%0Aimport org.junit.Test;%0Aimport org.talend.dataprep.api.preparation.Preparation;%0A%0Aimport java.util.Comparator;%0A%0Aimport static org.junit.Assert.*;%0Aimport static org.talend.dataprep.util.SortAndOrderHelper.Order.ASC;%0Aimport static org.talend.dataprep.util.SortAndOrderHelper.Order.DESC;%0Aimport static org.talend.dataprep.util.SortAndOrderHelper.Sort.NAME;%0A%0Apublic class SortAndOrderHelperTest %7B%0A%0A    @Test%0A    public void getPreparationComparator_byName() throws Exception %7B%0A        assertTrue(getComparisonByNameAsc(%22aaa%22, %22bbb%22, NAME, ASC) %3C 0);%0A        assertTrue(getComparisonByNameAsc(%22aaa%22, %22bbb%22, NAME, DESC) %3E 0);%0A    %7D%0A%0A    @Test%0A    public void getPreparationComparator_byNameUppercaseShouldNotInfluence() throws Exception %7B%0A        assertTrue(getComparisonByNameAsc(%22AAA%22, %22bbb%22, NAME, ASC) %3C 0);%0A%0A        assertTrue(getComparisonByNameAsc(%22aaa%22, %22BBB%22, NAME, ASC) %3C 0);%0A%0A        assertTrue(getComparisonByNameAsc(%22AAA%22, %22bbb%22, NAME, DESC) %3E 0);%0A%0A        assertTrue(getComparisonByNameAsc(%22aaa%22, %22BBB%22, NAME, DESC) %3E 0);%0A    %7D%0A%0A    private int getComparisonByNameAsc(String aaa, String bbb, SortAndOrderHelper.Sort sortField, SortAndOrderHelper.Order sortOrder) %7B%0A        Preparation firstNamedPrep = new Preparation();%0A        firstNamedPrep.setName(aaa);%0A        Preparation secondNamedPrep = new Preparation();%0A        secondNamedPrep.setName(bbb);%0A%0A        // when%0A        Comparator%3CPreparation%3E preparationComparator =%0A                SortAndOrderHelper.getPreparationComparator(sortField.name(), sortOrder.name());%0A%0A        // then%0A        assertNotNull(preparationComparator);%0A        return preparationComparator.compare(firstNamedPrep, secondNamedPrep);%0A    %7D%0A%0A%7D%0A

add tests on preparations name comparators