@Test
public void shouldFormatLogRecordCorrectly() {

  // When:
  final String msg = layout.format(loggingEvent);
  // Then:
  verifyBeforeBuild(builder, io -> io.verify(builder).withLevel(LOG_LEVEL.toString()));
  verifyBeforeBuild(builder, io -> io.verify(builder).withTimeMs(LOG_TIME_MS));
  verifyBeforeBuild(builder, io -> io.verify(builder).withLoggerName(LOGGER_NAME));
  verifyBeforeBuild(builder, io -> io.verify(builder).withMessageJson(STRUCTURED_MSG));
  assertThat(msg, equalTo(SERIALIZED_MSG));
}