### Question:
Endpoint implements Serializable { public static Endpoint of(String id, String url) { return new Endpoint(id, url); } private  Endpoint(String id, String url); static Endpoint of(String id, String url); static final String INFO; static final String HEALTH; static final String LOGFILE; static final String ENV; static final String HTTPTRACE; static final String THREADDUMP; static final String LIQUIBASE; static final String FLYWAY; static final String ACTUATOR_INDEX; }### Answer:
@Test public void invariants() { assertThatThrownBy(() -> Endpoint.of("", "")).isInstanceOf(IllegalArgumentException.class) .hasMessage("'id' must not be empty."); assertThatThrownBy(() -> Endpoint.of("id", "")).isInstanceOf(IllegalArgumentException.class) .hasMessage("'url' must not be empty."); }