public static Iterable getRepresentation(final Object result) {
if (result instanceof Iterable) {
if (result instanceof Table) {
final Table table = (Table) result;
return new IterableWrapper<Map<String,Object>,Table.Row>(table) {
@Override
protected Map<String, Object> underlyingObjectToObject(Table.Row row) {
Map<String,Object> result=new LinkedHashMap<String, Object>();
for (String column : table.getColumnNames()) {
result.put(column, row.getColumn(column));
}
return result;
}
};