@Test
void checkConsumerDelay() {

    var actionLog = logManager.begin(null, null);
    thread.checkConsumerDelay(actionLog, actionLog.date.minusSeconds(5).toEpochMilli(), Duration.ofSeconds(3).toNanos());
    assertThat(actionLog.stats).containsEntry("consumer_delay", (double) Duration.ofSeconds(5).toNanos());
    assertThat(actionLog.errorCode()).isEqualTo("LONG_CONSUMER_DELAY");
    actionLog = logManager.begin(null, null);
    thread.checkConsumerDelay(actionLog, actionLog.date.minusSeconds(1).toEpochMilli(), Duration.ofSeconds(6).toNanos());
    assertThat(actionLog.stats).containsEntry("consumer_delay", (double) Duration.ofSeconds(1).toNanos());
    assertThat(actionLog.errorCode()).isNull();
}