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