DeleteFeature extends AbstractCommand<DeleteFeature> implements ThingModifyCommand<DeleteFeature>,
        WithFeatureId { @Deprecated public static DeleteFeature of(final String thingId, final String featureId, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), featureId, dittoHeaders); } private  DeleteFeature(final ThingId thingId, final String featureId, final DittoHeaders dittoHeaders); @Deprecated static DeleteFeature of(final String thingId, final String featureId, final DittoHeaders dittoHeaders); static DeleteFeature of(final ThingId thingId, final String featureId, final DittoHeaders dittoHeaders); static DeleteFeature fromJson(final String jsonString, final DittoHeaders dittoHeaders); static DeleteFeature fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override ThingId getThingEntityId(); @Override String getFeatureId(); @Override JsonPointer getResourcePath(); @Override Category getCategory(); @Override DeleteFeature setDittoHeaders(final DittoHeaders dittoHeaders); @Override boolean changesAuthorization(); @Override int hashCode(); @SuppressWarnings("squid:MethodCyclomaticComplexity") @Override boolean equals(@Nullable final Object obj); @Override String toString(); static final String NAME; static final String TYPE; }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullFeatureId() { DeleteFeature.of(TestConstants.Thing.THING_ID, null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final DeleteFeature underTest = DeleteFeature.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, TestConstants.EMPTY_DITTO_HEADERS); final JsonValue actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }