public void setSortKey(SortKey sortkey) {
        if (Objects.equals(this.sortkey, sortkey)) {
            return;
        }

        invalidate();
        if (sortkey != null) {
            int column = sortkey.getColumn();
            if (valueComparators[column] == null) {
                throw new IllegalArgumentException(
                        format("Can't sort column %s, it is mapped to type %s and this one have no natural order. So an explicit one must be specified",
                                column, model.getColumnClass(column)));
            }
        }
        this.sortkey    = sortkey;
        this.comparator = null;
    }
@Test
    public void sortValueAscending() {
        sorter.setSortKey(new SortKey(1, SortOrder.ASCENDING));
        assertRowOrderAndIndexes(asList(c1(), b2(), a3(), d4()));
    }