FeaturesDeleted extends AbstractThingEvent<FeaturesDeleted> implements ThingModifiedEvent<FeaturesDeleted> { @Deprecated public static FeaturesDeleted of(final String thingId, final long revision, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), revision, null, dittoHeaders, null); } private  FeaturesDeleted(final ThingId thingId,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders,
            @Nullable final Metadata metadata); @Deprecated static FeaturesDeleted of(final String thingId,
            final long revision,
            final DittoHeaders dittoHeaders); @Deprecated static FeaturesDeleted of(final ThingId thingId,
            final long revision,
            final DittoHeaders dittoHeaders); @Deprecated static FeaturesDeleted of(final String thingId,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); @Deprecated static FeaturesDeleted of(final ThingId thingId,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); static FeaturesDeleted of(final ThingId thingId,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders,
            @Nullable final Metadata metadata); static FeaturesDeleted fromJson(final String jsonString, final DittoHeaders dittoHeaders); static FeaturesDeleted fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override JsonPointer getResourcePath(); @Override FeaturesDeleted setRevision(final long revision); @Override FeaturesDeleted setDittoHeaders(final DittoHeaders dittoHeaders); @Override String toString(); static final String NAME; static final String TYPE; }
@Test(expected = ThingIdInvalidException.class) public void tryToCreateInstanceWithNullThingIdString() { FeaturesDeleted.of((String) null, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullThingId() { FeaturesDeleted.of((ThingId) null, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final FeaturesDeleted underTest = FeaturesDeleted.of(TestConstants.Thing.THING_ID, TestConstants.Thing.REVISION_NUMBER, TestConstants.TIMESTAMP, TestConstants.EMPTY_DITTO_HEADERS, TestConstants.METADATA); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }