}
public void testPrintStream() throws Exception
{
ByteArrayOutputStream bout = new ByteArrayOutputStream();
h.setSQLLog(new PrintStreamLog(new PrintStream(bout)));
String sql = "insert into something (id, name) values (?, ?)";
h.insert(sql, 1, "Brian");
assertTrue(new String(bout.toByteArray())
.matches("statement:\\[insert into something \\(id, name\\) values \\(\\?, \\?\\)\\] took \\d+ millis\n"));