Assert.assertTrue(table.createExtendedDataModel() instanceof Arrangeable);
MockArrangeableModel model = new MockArrangeableModel();
table.setValue(model);
table.setSortPriority(sortPriority);
Assert.assertSame(model, table.createExtendedDataModel());
ArrangeableState state = model.getState();
List<FilterField> filterFields = state.getFilterFields();
for (int i = 0; i < sortPriority.size(); i++) {
Assert.assertEquals("id" + i, filterFields.get(i).getFilterExpression().getValue(elContext));
}
List<SortField> sortFields = state.getSortFields();
for (int i = 0; i < sortPriority.size(); i++) {
Assert.assertEquals(sortPriority.get(i), sortFields.get(i).getSortBy().getValue(elContext));
}
Assert.assertEquals(facesContext.getViewRoot().getLocale(), state.getLocale());
}