ModifyFeatureProperties extends AbstractCommand<ModifyFeatureProperties> implements
        ThingModifyCommand<ModifyFeatureProperties>, WithFeatureId { @Deprecated public static ModifyFeatureProperties of(final String thingId, final String featureId, final FeatureProperties properties, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), featureId, properties, dittoHeaders); } private  ModifyFeatureProperties(final ThingId thingId,
            final String featureId,
            final FeatureProperties properties,
            final DittoHeaders dittoHeaders); @Deprecated static ModifyFeatureProperties of(final String thingId, final String featureId,
            final FeatureProperties properties, final DittoHeaders dittoHeaders); static ModifyFeatureProperties of(final ThingId thingId, final String featureId,
            final FeatureProperties properties, final DittoHeaders dittoHeaders); static ModifyFeatureProperties fromJson(final String jsonString, final DittoHeaders dittoHeaders); static ModifyFeatureProperties fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override ThingId getThingEntityId(); FeatureProperties getProperties(); @Override String getFeatureId(); @Override Optional<JsonValue> getEntity(final JsonSchemaVersion schemaVersion); @Override JsonPointer getResourcePath(); @Override Category getCategory(); @Override ModifyFeatureProperties setDittoHeaders(final DittoHeaders dittoHeaders); @Override boolean changesAuthorization(); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString(); static final String NAME; static final String TYPE; }
@Test(expected = ThingIdInvalidException.class) public void tryToCreateInstanceWithNullThingIdString() { ModifyFeatureProperties.of((String) null, TestConstants.Feature.FLUX_CAPACITOR_ID, TestConstants.Feature.FLUX_CAPACITOR_PROPERTIES, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullThingId() { ModifyFeatureProperties.of((ThingId) null, TestConstants.Feature.FLUX_CAPACITOR_ID, TestConstants.Feature.FLUX_CAPACITOR_PROPERTIES, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullFeatureId() { ModifyFeatureProperties.of(TestConstants.Thing.THING_ID, null, TestConstants.Feature.FLUX_CAPACITOR_PROPERTIES, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullProperties() { ModifyFeatureProperties.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final ModifyFeatureProperties underTest = ModifyFeatureProperties.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, TestConstants.Feature.FLUX_CAPACITOR_PROPERTIES, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }