FeaturePropertiesModified extends AbstractThingEvent<FeaturePropertiesModified> implements
        ThingModifiedEvent<FeaturePropertiesModified>, WithFeatureId { @Deprecated public static FeaturePropertiesModified of(final String thingId, final String featureId, final FeatureProperties properties, final long revision, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), featureId, properties, revision, null, dittoHeaders, null); } private  FeaturePropertiesModified(final ThingId thingId,
            final String featureId,
            final FeatureProperties properties,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders,
            @Nullable final Metadata metadata); @Deprecated static FeaturePropertiesModified of(final String thingId,
            final String featureId,
            final FeatureProperties properties,
            final long revision,
            final DittoHeaders dittoHeaders); @Deprecated static FeaturePropertiesModified of(final ThingId thingId,
            final String featureId,
            final FeatureProperties properties,
            final long revision,
            final DittoHeaders dittoHeaders); @Deprecated static FeaturePropertiesModified of(final String thingId,
            final String featureId,
            final FeatureProperties properties,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); @Deprecated static FeaturePropertiesModified of(final ThingId thingId,
            final String featureId,
            final FeatureProperties properties,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); static FeaturePropertiesModified of(final ThingId thingId,
            final String featureId,
            final FeatureProperties properties,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders,
            @Nullable final Metadata metadata); static FeaturePropertiesModified fromJson(final String jsonString, final DittoHeaders dittoHeaders); static FeaturePropertiesModified fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override String getFeatureId(); FeatureProperties getProperties(); @Override Optional<JsonValue> getEntity(final JsonSchemaVersion schemaVersion); @Override JsonPointer getResourcePath(); @Override FeaturePropertiesModified setRevision(final long revision); @Override FeaturePropertiesModified setDittoHeaders(final DittoHeaders dittoHeaders); @SuppressWarnings("squid:S109") @Override int hashCode(); @SuppressWarnings({"squid:MethodCyclomaticComplexity", "squid:S1067", "OverlyComplexMethod"}) @Override boolean equals(@Nullable final Object o); @Override String toString(); static final String NAME; static final String TYPE; }
@Test(expected = ThingIdInvalidException.class) public void tryToCreateInstanceWithNullThingIdString() { FeaturePropertiesModified.of((String) null, TestConstants.Feature.FLUX_CAPACITOR_ID, TestConstants.Feature.FLUX_CAPACITOR_PROPERTIES, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullThingId() { FeaturePropertiesModified.of((ThingId) null, TestConstants.Feature.FLUX_CAPACITOR_ID, TestConstants.Feature.FLUX_CAPACITOR_PROPERTIES, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullFeatureId() { FeaturePropertiesModified.of(TestConstants.Thing.THING_ID, null, TestConstants.Feature.FLUX_CAPACITOR_PROPERTIES, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullProperties() { FeaturePropertiesModified.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, null, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final FeaturePropertiesModified underTest = FeaturePropertiesModified.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, TestConstants.Feature.FLUX_CAPACITOR_PROPERTIES, TestConstants.Thing.REVISION_NUMBER, TestConstants.TIMESTAMP, TestConstants.EMPTY_DITTO_HEADERS, TestConstants.METADATA); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualToIgnoringFieldDefinitions(KNOWN_JSON); }