TrackMessage implements Message { public static Builder builder(String event) { return new Builder(event); }  static Builder builder(String event); abstract String event(); @Nullable abstract Map<String, ?> properties(); Builder toBuilder();  }
@Test public void invalidNameThrows() { try { TrackMessage.builder(null); } catch (IllegalArgumentException e) { assertThat(e).hasMessage("event cannot be null or empty."); } }