@Test
public void testShouldLog() throws Exception {

  JpaLogger logger = new JpaLogger();
  Assert.assertTrue(logger.shouldLog(SessionLog.SEVERE, ""));
  Assert.assertTrue(logger.shouldLog(SessionLog.WARNING, ""));
  Assert.assertFalse(logger.shouldLog(SessionLog.CONFIG, ""));
  Assert.assertFalse(logger.shouldLog(SessionLog.FINER, ""));
  Assert.assertFalse(logger.shouldLog(SessionLog.ALL, ""));
  logger.setLogLevel(Level.FINER);
  Assert.assertTrue(logger.shouldLog(SessionLog.SEVERE, ""));
  Assert.assertTrue(logger.shouldLog(SessionLog.WARNING, ""));
  Assert.assertTrue(logger.shouldLog(SessionLog.CONFIG, ""));
  Assert.assertTrue(logger.shouldLog(SessionLog.FINER, ""));
  Assert.assertFalse(logger.shouldLog(SessionLog.ALL, ""));
  logger.setLogLevel(Level.SEVERE);
  Assert.assertTrue(logger.shouldLog(SessionLog.SEVERE, ""));
  Assert.assertFalse(logger.shouldLog(SessionLog.WARNING, ""));
  Assert.assertFalse(logger.shouldLog(SessionLog.CONFIG, ""));
  Assert.assertFalse(logger.shouldLog(SessionLog.FINER, ""));
  Assert.assertFalse(logger.shouldLog(SessionLog.ALL, ""));
}