@Test
void message() {

    var event = new Event();
    event.date = ZonedDateTime.now().minusHours(1);
    event.result = Result.WARN;
    event.errorCode = "NOT_FOUND";
    event.errorMessage = "not found";
    event.context.put("path", "/path");
    event.info.put("stackTrace", "trace");
    event.elapsedTime = 100L;
    var controller = new EventController(List.of(), null);
    Instant now = event.date.plusHours(1).toInstant();
    EventMessage message = controller.message(event, "test", now);
    assertThat(message.id).isNotNull();
    assertThat(message.date).isEqualTo(event.date.toInstant());
    assertThat(message.receivedTime).isEqualTo(now);
    assertThat(message.result).isEqualTo("WARN");
    assertThat(message.errorCode).isEqualTo(event.errorCode);
    assertThat(message.errorMessage).isEqualTo(event.errorMessage);
    assertThat(message.action).isNull();
    assertThat(message.context).isEqualTo(event.context);
    assertThat(message.info).isEqualTo(event.info);
    assertThat(message.elapsed).isEqualTo(event.elapsedTime);
    assertThat(message.app).isEqualTo("test");
}