sortModel = SortModelFixture.getEmptyModel();
sortHeaderLayer = new SortHeaderLayer<RowDataFixture>(
new DataLayerFixture(10, 20, 100, 20), sortModel);
sortStatePersistor = new SortStatePersistor<RowDataFixture>(sortModel);
sortStatePersistor.loadState(TEST_PREFIX, properties);
ISortModel sortModel = sortHeaderLayer.getSortModel();
// Sort direction
assertEquals(SortDirectionEnum.DESC, sortModel.getSortDirection(0));
assertEquals(SortDirectionEnum.ASC, sortModel.getSortDirection(3));
assertEquals(SortDirectionEnum.DESC, sortModel.getSortDirection(5));
assertEquals(SortDirectionEnum.ASC, sortModel.getSortDirection(6));
// Sort order
assertEquals(3, sortModel.getSortOrder(0));
assertEquals(2, sortModel.getSortOrder(3));
assertEquals(1, sortModel.getSortOrder(5));
assertEquals(0, sortModel.getSortOrder(6));
// No other columns should be flagged as sorted
assertEquals(-1, sortModel.getSortOrder(4));
assertFalse(sortModel.isColumnIndexSorted(4));
assertEquals(SortDirectionEnum.NONE, sortModel.getSortDirection(4));
}