LoggingExpired extends AbstractCommand<LoggingExpired> implements ConnectivityModifyCommand<LoggingExpired> { public static LoggingExpired of(final ConnectionId connectionId) { return of(connectionId, DittoHeaders.empty()); } private  LoggingExpired(final ConnectionId connectionId, final DittoHeaders dittoHeaders); static LoggingExpired of(final ConnectionId connectionId); static LoggingExpired of(final ConnectionId connectionId, final DittoHeaders dittoHeaders); static LoggingExpired fromJson(final String jsonString); static LoggingExpired fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); static LoggingExpired fromJson(final JsonObject jsonObject); @Override ConnectionId getConnectionEntityId(); @Override Category getCategory(); @Override LoggingExpired setDittoHeaders(final DittoHeaders dittoHeaders); @Override boolean equals(final Object o); @Override int hashCode(); static final String NAME; static final String TYPE; }
@Test public void createInstanceWithNullConnectionId() { assertThatExceptionOfType(NullPointerException.class) .isThrownBy(() -> LoggingExpired.of(null, DittoHeaders.empty())) .withMessage("The %s must not be null!", "Connection ID") .withNoCause(); }
@Test public void toJsonReturnsExpected() { final JsonObject actual = LoggingExpired.of(TestConstants.ID).toJson(); assertThat(actual).isEqualTo(KNOWN_JSON); }