@Test
void sendEventRequestWithEmptyBody() {

    var controller = new EventController(List.of(), null);
    when(request.body()).thenReturn(Optional.empty());
    when(request.header(HTTPHeaders.CONTENT_TYPE)).thenReturn(Optional.of(ContentType.APPLICATION_JSON.toString()));
    assertThatThrownBy(() -> controller.sendEventRequest(request))
            .isInstanceOf(BadRequestException.class)
            .hasMessageContaining("body must not be null");
    when(request.header(HTTPHeaders.CONTENT_TYPE)).thenReturn(Optional.of(ContentType.TEXT_PLAIN.toString()));
    assertThat(controller.sendEventRequest(request)).isNull();
}