### Question:
HibernateNPlusOneLogger extends HibernateStatementStatistics { @Override public void end() { log(getQueryCount()); } HibernateNPlusOneLogger(); @Override void end();  }### Answer:
@Test public void testNoWarning() { callSQL(500); underTest.end(); String log = underTest.constructLogline(); assertThat(log, containsString("executing 500 JDBC statements")); }
@Test void testWarning() { callSQL(501); underTest.end(); String log = underTest.constructLogline(); assertThat(log, containsString("executing 501 JDBC statements")); }