@Test
void error()
{

    LogQueue queue = new LogQueue();
    LogEvent logEvent;
    queue.error("");
    logEvent = queue.poll();
    assertEquals(Arrays.asList(""), logEvent.getMessageElements());
    assertEquals("", logEvent.getFormattedMessage());
    queue.error("message");
    assertEquals("message", queue.poll().getFormattedMessage());
    queue.error("message {}", "param");
    assertEquals("message param", queue.poll().getFormattedMessage());
    queue.error("message {} {}", "param1", "param2");
    logEvent = queue.poll();
    assertEquals("message param1 param2", logEvent.getFormattedMessage());
    assertEquals(Arrays.asList("message ", " ", ""), logEvent.getMessageElements());
    assertEquals(Arrays.asList("param1", "param2"), Arrays.asList(logEvent.getArgumentArray()));
    queue.error("message {}", "param1", new Exception());
    logEvent = queue.poll();
    assertEquals("message param1", logEvent.getFormattedMessage());
    assertEquals(Arrays.asList("message ", ""), logEvent.getMessageElements());
    assertEquals(Arrays.asList("param1"), Arrays.asList(logEvent.getArgumentArray()));
    assertNotNull(logEvent.getThrowable());
    assertNull(logEvent.getTranslationKey());
    queue.error("message {}", new Object[]{ "param1", new Exception() });
    logEvent = queue.poll();
    assertEquals("message param1", logEvent.getFormattedMessage());
    assertEquals(Arrays.asList("message ", ""), logEvent.getMessageElements());
    assertEquals(Arrays.asList("param1"), Arrays.asList(logEvent.getArgumentArray()));
    assertNotNull(logEvent.getThrowable());
    assertNull(logEvent.getTranslationKey());
    queue.error(new TranslationMarker("translation.key"), "message");
    logEvent = queue.poll();
    assertEquals("translation.key", logEvent.getTranslationKey());
    assertEquals(Arrays.asList("message"), logEvent.getMessageElements());
    assertEquals(Arrays.asList(), Arrays.asList(logEvent.getArgumentArray()));
}