TestRdbmsOperation operation = new TestRdbmsOperation();
DataSource ds = new DriverManagerDataSource();
operation.setDataSource(ds);
operation.setSql("select * from mytable where one = ? and two = ?");
List l = new ArrayList();
l.add(new SqlParameter("one", Types.NUMERIC));
l.add(new SqlParameter("two", Types.VARCHAR));
operation.setParameters(new SqlParameter[] {
new SqlParameter("one", Types.NUMERIC),
new SqlParameter("two", Types.NUMERIC)});
operation.afterPropertiesSet();
try {
operation.validateParameters(new Object[] {new Integer(1), new String("2")});
assertEquals(2, operation.getDeclaredParameters().size());
// OK