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