ConnectionDeleted extends AbstractConnectivityEvent<ConnectionDeleted> implements ConnectivityEvent<ConnectionDeleted> { @Deprecated public static ConnectionDeleted of(final String connectionId, final DittoHeaders dittoHeaders) { return of(ConnectionId.of(connectionId), dittoHeaders); } private  ConnectionDeleted(final ConnectionId connectionId, @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); @Deprecated static ConnectionDeleted of(final String connectionId, final DittoHeaders dittoHeaders); static ConnectionDeleted of(final ConnectionId connectionId, final DittoHeaders dittoHeaders); @Deprecated static ConnectionDeleted of(final String connectionId, @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); static ConnectionDeleted of(final ConnectionId connectionId, @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); static ConnectionDeleted fromJson(final String jsonString, final DittoHeaders dittoHeaders); static ConnectionDeleted fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override JsonPointer getResourcePath(); @Override ConnectionDeleted setDittoHeaders(final DittoHeaders dittoHeaders); @Override String toString(); static final String NAME; static final String TYPE; }
@Test public void createInstanceWithNullConnectionIdString() { assertThatExceptionOfType(NullPointerException.class) .isThrownBy(() -> ConnectionDeleted.of((String) null, DittoHeaders.empty())) .withMessage("The entityId must not be null!") .withNoCause(); }
@Test public void createInstanceWithNullConnectionId() { assertThatExceptionOfType(NullPointerException.class) .isThrownBy(() -> ConnectionDeleted.of((ConnectionId) null, DittoHeaders.empty())) .withMessage("The %s must not be null!", "Connection ID") .withNoCause(); }
@Test public void toJsonReturnsExpected() { final JsonObject actual = ConnectionDeleted.of(TestConstants.ID, DittoHeaders.empty()).toJson(); assertThat(actual).isEqualTo(KNOWN_JSON); }