ThingErrorResponse extends AbstractErrorResponse<ThingErrorResponse> implements ThingCommandResponse<ThingErrorResponse> { public static ThingErrorResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders) { final JsonObject jsonObject = DittoJsonException.wrapJsonRuntimeException(() -> JsonFactory.newObject(jsonString)); return fromJson(jsonObject, dittoHeaders); } private  ThingErrorResponse(final ThingId thingId, final DittoRuntimeException dittoRuntimeException,
            final DittoHeaders dittoHeaders); static ThingErrorResponse of(final DittoRuntimeException dittoRuntimeException); @Deprecated static ThingErrorResponse of(final String thingId, final DittoRuntimeException dittoRuntimeException); static ThingErrorResponse of(final ThingId thingId, final DittoRuntimeException dittoRuntimeException); static ThingErrorResponse of(final DittoRuntimeException dittoRuntimeException,
            final DittoHeaders dittoHeaders); @Deprecated static ThingErrorResponse of(final String thingId, final DittoRuntimeException dittoRuntimeException,
            final DittoHeaders dittoHeaders); static ThingErrorResponse of(final ThingId thingId, final DittoRuntimeException dittoRuntimeException,
            final DittoHeaders dittoHeaders); static ThingErrorResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static ThingErrorResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override ThingId getThingEntityId(); @Override DittoRuntimeException getDittoRuntimeException(); @Override JsonPointer getResourcePath(); @Override ThingErrorResponse setDittoHeaders(final DittoHeaders dittoHeaders); @SuppressWarnings("squid:S109") @Override int hashCode(); @SuppressWarnings("squid:MethodCyclomaticComplexity") @Override boolean equals(@Nullable final Object o); @Override String toString(); static final String TYPE; }
@Test public void createInstanceFromValidJson() { final ThingErrorResponse underTest = ThingErrorResponse.fromJson(KNOWN_JSON, TestConstants.EMPTY_DITTO_HEADERS); assertThat(underTest).isNotNull(); }