Connection conn = dataSource.getConnection();
String sql = "select 'x'";
PreparedStatement stmt = conn.prepareStatement("select 'x'");
JdbcSqlStat sqlStat = dataSource.getDataSourceStat().getSqlStat(sql);
Assert.assertEquals(0, sqlStat.getClobOpenCount());
ResultSet rs = stmt.executeQuery();
rs.next();
rs.getObject("1", Collections.<String,Class<?>>emptyMap());
rs.getObject("2", Collections.<String,Class<?>>emptyMap());
rs.getObject("3", Collections.<String,Class<?>>emptyMap());
rs.getObject("4", Collections.<String,Class<?>>emptyMap());
rs.getObject("5", Collections.<String,Class<?>>emptyMap());
rs.close();
stmt.close();
conn.close();
Assert.assertEquals(5, sqlStat.getClobOpenCount());
sqlStat.reset();
Assert.assertEquals(0, sqlStat.getClobOpenCount());
}