FeaturePropertyModified extends AbstractThingEvent<FeaturePropertyModified> implements
        ThingModifiedEvent<FeaturePropertyModified>, WithFeatureId { @Deprecated public static FeaturePropertyModified of(final String thingId, final String featureId, final JsonPointer propertyJsonPointer, final JsonValue propertyValue, final long revision, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), featureId, propertyJsonPointer, propertyValue, revision, null, dittoHeaders, null); } private  FeaturePropertyModified(final ThingId thingId,
            final String featureId,
            final JsonPointer propertyPointer,
            final JsonValue propertyValue,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders,
            @Nullable final Metadata metadata); @Deprecated static FeaturePropertyModified of(final String thingId,
            final String featureId,
            final JsonPointer propertyJsonPointer,
            final JsonValue propertyValue,
            final long revision,
            final DittoHeaders dittoHeaders); @Deprecated static FeaturePropertyModified of(final ThingId thingId,
            final String featureId,
            final JsonPointer propertyJsonPointer,
            final JsonValue propertyValue,
            final long revision,
            final DittoHeaders dittoHeaders); @Deprecated static FeaturePropertyModified of(final String thingId,
            final String featureId,
            final JsonPointer propertyJsonPointer,
            final JsonValue propertyValue,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); @Deprecated static FeaturePropertyModified of(final ThingId thingId,
            final String featureId,
            final JsonPointer propertyJsonPointer,
            final JsonValue propertyValue,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders); static FeaturePropertyModified of(final ThingId thingId,
            final String featureId,
            final JsonPointer propertyJsonPointer,
            final JsonValue propertyValue,
            final long revision,
            @Nullable final Instant timestamp,
            final DittoHeaders dittoHeaders,
            @Nullable final Metadata metadata); static FeaturePropertyModified fromJson(final String jsonString, final DittoHeaders dittoHeaders); static FeaturePropertyModified fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override String getFeatureId(); JsonPointer getPropertyPointer(); JsonValue getPropertyValue(); @Override Optional<JsonValue> getEntity(final JsonSchemaVersion schemaVersion); @Override JsonPointer getResourcePath(); @Override FeaturePropertyModified setRevision(final long revision); @Override FeaturePropertyModified 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() { FeaturePropertyModified .of((String) null, TestConstants.Feature.FLUX_CAPACITOR_ID, PROPERTY_JSON_POINTER, NEW_PROPERTY_VALUE, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullThingId() { FeaturePropertyModified .of((ThingId) null, TestConstants.Feature.FLUX_CAPACITOR_ID, PROPERTY_JSON_POINTER, NEW_PROPERTY_VALUE, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullFeatureId() { FeaturePropertyModified.of(TestConstants.Thing.THING_ID, null, PROPERTY_JSON_POINTER, NEW_PROPERTY_VALUE, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullPropertyJsonPointer() { FeaturePropertyModified .of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, null, NEW_PROPERTY_VALUE, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullPropertyValue() { FeaturePropertyModified .of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, PROPERTY_JSON_POINTER, null, TestConstants.Thing.REVISION_NUMBER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final FeaturePropertyModified underTest = FeaturePropertyModified .of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, PROPERTY_JSON_POINTER, NEW_PROPERTY_VALUE, TestConstants.Thing.REVISION_NUMBER, TestConstants.TIMESTAMP, TestConstants.EMPTY_DITTO_HEADERS, TestConstants.METADATA); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }