*
* @param expectedLevel
* @throws Exception
*/
private void testLog(final Logger.Level expectedLevel) throws Exception {
SyslogServerEventIF log = BlockedSyslogServerEventHandler.getQueue().poll(15 * ADJUSTED_SECOND, TimeUnit.MILLISECONDS);
assertNotNull(log);
assertEquals("Message with unexpected Syslog event level received.", getSyslogLevel(expectedLevel), log.getLevel());
final String expectedMsg = MessageFormat.format(LoggingServlet.MSG_TEMPLATE, LoggingServlet.getPrefix(LOG_PREFIX),
LoggingServlet.getLevelStr(expectedLevel));
String msg = log.getMessage();
assertEquals("Message with unexpected Syslog event text received.", expectedMsg, msg);
}