@Test
public void testCreateExtendedDataModel() {
Assert.assertFalse(table.createExtendedDataModel() instanceof Arrangeable);
List<Object> sortPriority = Arrays.<Object>asList("id2", "id0", "id1");
List<UIComponent> children = table.getChildren();
ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
ELContext elContext = facesContext.getELContext();
UIColumn column = new UIColumn();
column.setRendered(false);
children.add(column);
for (int i = 0; i < sortPriority.size(); i++) {
UIColumn child = new UIColumn();
child.setId("id" + i);
child.setValueExpression("filterExpression",
expressionFactory.createValueExpression(elContext, "#{'id" + i + "'}", Object.class));
child.setValueExpression("sortBy",
expressionFactory.createValueExpression(elContext, "#{'id" + i + "'}", Object.class));
child.setSortOrder(SortOrder.ascending);
children.add(child);
}
Assert.assertTrue(table.createExtendedDataModel() instanceof Arrangeable);
MockArrangeableModel model = new MockArrangeableModel();