assertEquals("age1", query.getParameterNames().get(0));
assertEquals("age2", query.getParameterNames().get(1));
assertEquals("select * from user_impl where 1 = 1", query.getSql(null));
QueryParameter p1 = new QueryParameter(new ParameterDefinition("age1"));
QueryParameter p2 = new QueryParameter(new ParameterDefinition("age2"));
p1.setValue("30");
p2.setValue("");
assertEquals("select * from user_impl where 1 = 1 and age > ?", query.getSql(new QueryParameter[] { p1, p2 }));
p2.setValue("50");
assertEquals("select * from user_impl where 1 = 1 and age > ? and age < ?", query.getSql(new QueryParameter[] { p1, p2 }));
}