DeleteFeatures extends AbstractCommand<DeleteFeatures> implements ThingModifyCommand<DeleteFeatures> { @Deprecated public static DeleteFeatures of(final String thingId, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), dittoHeaders); } private  DeleteFeatures(final ThingId thingId, final DittoHeaders dittoHeaders); @Deprecated static DeleteFeatures of(final String thingId, final DittoHeaders dittoHeaders); static DeleteFeatures of(final ThingId thingId, final DittoHeaders dittoHeaders); static DeleteFeatures fromJson(final String jsonString, final DittoHeaders dittoHeaders); static DeleteFeatures fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override ThingId getThingEntityId(); @Override JsonPointer getResourcePath(); @Override Category getCategory(); @Override DeleteFeatures 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 = ThingIdInvalidException.class) public void tryToCreateInstanceWithNullThingIdString() { DeleteFeatures.of((String) null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullThingId() { DeleteFeatures.of((ThingId) null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final DeleteFeatures underTest = DeleteFeatures.of(TestConstants.Thing.THING_ID, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }