Ordering[] orderings = null;
Limit limit = qomFactory.limit(2, 0);
boolean isDistinct = false;
// Build and execute the query ...
SelectQuery selectQuery = qomFactory.select(selector, constraint, orderings, columns, limit, isDistinct);
Query query1 = qomFactory.createQuery(selectQuery);
QueryResult result1 = query1.execute();
String[] columnNames = {"maker", "car:model", "car:year", "car:userRating"};
validateQuery().rowCount(2).hasColumns(columnNames).validate(query1, result1);