ThingDefinitionDeleted extends AbstractThingEvent<ThingDefinitionDeleted> implements ThingModifiedEvent<ThingDefinitionDeleted> { @Deprecated public static ThingDefinitionDeleted of(final ThingId thingId, final long revision, final DittoHeaders dittoHeaders) { return of(thingId, revision, null, dittoHeaders, null); } private  ThingDefinitionDeleted(final ThingId thingId,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders,
            @Nullable final Metadata metadata); @Deprecated static ThingDefinitionDeleted of(final ThingId thingId,
            final long revision,
            final DittoHeaders dittoHeaders); @Deprecated static ThingDefinitionDeleted of(final ThingId thingId,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); static ThingDefinitionDeleted of(final ThingId thingId,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders,
            @Nullable final Metadata metadata); static ThingDefinitionDeleted fromJson(final String jsonString, final DittoHeaders dittoHeaders); static ThingDefinitionDeleted fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override JsonPointer getResourcePath(); @Override ThingDefinitionDeleted setRevision(final long revision); @Override ThingDefinitionDeleted setDittoHeaders(final DittoHeaders dittoHeaders); @Override String toString(); static final String NAME; static final String TYPE; }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullThingId() { ThingDefinitionDeleted.of((ThingId) null, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final ThingDefinitionDeleted underTest = ThingDefinitionDeleted.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); }