DeleteAttributeResponse extends AbstractCommandResponse<DeleteAttributeResponse> implements
        ThingModifyCommandResponse<DeleteAttributeResponse> { @Deprecated public static DeleteAttributeResponse of(final String thingId, final JsonPointer attributePointer, final DittoHeaders dittoHeaders) { return of(ThingId.of(thingId), attributePointer, dittoHeaders); } private  DeleteAttributeResponse(final ThingId thingId, final JsonPointer attributePointer,
            final DittoHeaders dittoHeaders); @Deprecated static DeleteAttributeResponse of(final String thingId, final JsonPointer attributePointer,
            final DittoHeaders dittoHeaders); static DeleteAttributeResponse of(final ThingId thingId, final JsonPointer attributePointer,
            final DittoHeaders dittoHeaders); static DeleteAttributeResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static DeleteAttributeResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override ThingId getThingEntityId(); JsonPointer getAttributePointer(); @Override JsonPointer getResourcePath(); @Override DeleteAttributeResponse setDittoHeaders(final DittoHeaders dittoHeaders); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString(); static final String TYPE; }
@Test public void toJsonReturnsExpected() { final DeleteAttributeResponse underTest = DeleteAttributeResponse.of(TestConstants.Thing.THING_ID, TestConstants.Thing.LOCATION_ATTRIBUTE_POINTER, DittoHeaders.empty()); final JsonObject actualJsonUpdated = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJsonUpdated).isEqualTo(KNOWN_JSON); }
@Test(expected = JsonKeyInvalidException.class) public void createInstanceWithInvalidArguments() { DeleteAttributeResponse.of(TestConstants.Thing.THING_ID, TestConstants.Pointer.INVALID_JSON_POINTER, TestConstants.EMPTY_DITTO_HEADERS); }
@Test(expected = AttributePointerInvalidException.class) public void createInstanceWithEmptyPointer() { DeleteAttributeResponse.of(TestConstants.Thing.THING_ID, EMPTY_JSON_POINTER, TestConstants.EMPTY_DITTO_HEADERS); }