@Test
void getLogEvents() throws IOException
{

    LogQueue queue = new LogQueue();
    assertEquals(0, queue.getLogEvents(LogLevel.TRACE).stream().count());
    assertEquals(0, queue.getLogEvents(LogLevel.DEBUG).stream().count());
    assertEquals(0, queue.getLogEvents(LogLevel.INFO).stream().count());
    assertEquals(0, queue.getLogEvents(LogLevel.WARN).stream().count());
    assertEquals(0, queue.getLogEvents(LogLevel.ERROR).stream().count());
    queue.warn("");
    assertEquals(1, queue.getLogEvents(LogLevel.TRACE).stream().count());
    assertTrue(queue.hasLogLevel(LogLevel.TRACE));
    assertEquals(1, queue.getLogEvents(LogLevel.DEBUG).stream().count());
    assertTrue(queue.hasLogLevel(LogLevel.DEBUG));
    assertEquals(1, queue.getLogEvents(LogLevel.INFO).stream().count());
    assertTrue(queue.hasLogLevel(LogLevel.INFO));
    assertEquals(1, queue.getLogEvents(LogLevel.WARN).stream().count());
    assertTrue(queue.hasLogLevel(LogLevel.WARN));
    assertEquals(0, queue.getLogEvents(LogLevel.ERROR).stream().count());
    assertFalse(queue.hasLogLevel(LogLevel.ERROR));
    assertEquals(1, queue.getLogEvents(null).stream().count());
}