throws SQLException {
SQLGenerator sg = new MSSQLGenerator();
List<Filter> f = new ArrayList<Filter>();
f.add(new Like("name", "%lle"));
List<OrderBy> ob = Arrays.asList(new OrderBy("name", true));
StatementHelper sh = sg.generateSelectQuery("TABLE", f, ob, 4, 8,
"NAME, ID");
Assert.assertEquals(sh.getQueryString(),
"SELECT * FROM (SELECT row_number() OVER "
+ "( ORDER BY \"name\" ASC) AS rownum, NAME, ID "
+ "FROM TABLE WHERE \"name\" LIKE ?) "
+ "AS a WHERE a.rownum BETWEEN 5 AND 12");
}