assertTrue(beforeStats instanceof String);
assertEquals(beforeStats, expectedBeforeBuffer.toString());
// Obtaining connections
DataSource ds = (DataSource)initCtx.lookup("StatsDS");
Connection conn1 = ds.getConnection("sa", "");
Object conn1Stats = StatisticsHelper.listFormattedStatistics(getServer());
assertTrue(conn1Stats instanceof String);
Pattern p1 = Pattern.compile(expectedConn1Buffer.toString());
Matcher m1 = p1.matcher((String)conn1Stats);
assertTrue(m1.matches());
Connection conn2 = ds.getConnection("sa", "");
Object conn2Stats = StatisticsHelper.listFormattedStatistics(getServer());
assertTrue(conn2Stats instanceof String);