new FacesRequest()
{
@Override
protected void invokeApplication() throws Exception
{
DataModels dataModels = DataModels.instance();
assert dataModels.getDataModel(new ArrayList()) instanceof ListDataModel;
assert dataModels.getDataModel(new HashMap()) instanceof MapDataModel;
assert dataModels.getDataModel(new HashSet()) instanceof SetDataModel;
assert dataModels.getDataModel(new Object[0]) instanceof ArrayDataModel;
// TODO assert dataModels.getDataModel(query) instanceof ListDataModel;
boolean failed = false;
try
{
dataModels.getDataModel(new Foo());
}
catch (IllegalArgumentException e)
{
failed = true;
}