DeleteFeatureProperty extends AbstractCommand<DeleteFeatureProperty> implements
        ThingModifyCommand<DeleteFeatureProperty>, WithFeatureId { @Deprecated public static DeleteFeatureProperty of(final String thingId, final String featureId, final JsonPointer propertyPointer, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), featureId, propertyPointer, dittoHeaders); } private  DeleteFeatureProperty(final ThingId thingId, final String featureId, final JsonPointer propertyPointer,
            final DittoHeaders dittoHeaders); @Deprecated static DeleteFeatureProperty of(final String thingId, final String featureId,
            final JsonPointer propertyPointer, final DittoHeaders dittoHeaders); static DeleteFeatureProperty of(final ThingId thingId, final String featureId,
            final JsonPointer propertyPointer, final DittoHeaders dittoHeaders); static DeleteFeatureProperty fromJson(final String jsonString, final DittoHeaders dittoHeaders); static DeleteFeatureProperty fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); JsonPointer getPropertyPointer(); @Override ThingId getThingEntityId(); @Override String getFeatureId(); @Override JsonPointer getResourcePath(); @Override Category getCategory(); @Override DeleteFeatureProperty 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() { DeleteFeatureProperty.of((String) null, TestConstants.Feature.FLUX_CAPACITOR_ID, PROPERTY_JSON_POINTER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullThingId() { DeleteFeatureProperty.of((ThingId) null, TestConstants.Feature.FLUX_CAPACITOR_ID, PROPERTY_JSON_POINTER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullFeatureId() { DeleteFeatureProperty.of(TestConstants.Thing.THING_ID, null, PROPERTY_JSON_POINTER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = NullPointerException.class) public void tryToCreateInstanceWithNullPropertyJsonPointer() { DeleteFeatureProperty.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, null, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void createInstanceWithValidArguments() { final DeleteFeatureProperty underTest = DeleteFeatureProperty.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, PROPERTY_JSON_POINTER, TestConstants.EMPTY_DITTO_HEADERS); assertThat(underTest).isNotNull(); }
@Test(expected = JsonKeyInvalidException.class) public void createInstanceWithInvalidArgument() { DeleteFeatureProperty.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, INVALID_PROPERTY_JSON_POINTER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test public void toJsonReturnsExpected() { final DeleteFeatureProperty underTest = DeleteFeatureProperty.of(TestConstants.Thing.THING_ID, TestConstants.Feature.FLUX_CAPACITOR_ID, PROPERTY_JSON_POINTER, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJson = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJson).isEqualTo(KNOWN_JSON); }