PolicyErrorResponse extends AbstractErrorResponse<PolicyErrorResponse> implements PolicyCommandResponse<PolicyErrorResponse> { public static PolicyErrorResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders) { final JsonObject jsonObject = DittoJsonException.wrapJsonRuntimeException(() -> JsonFactory.newObject(jsonString)); return fromJson(jsonObject, dittoHeaders); } private  PolicyErrorResponse(final PolicyId policyId, final DittoRuntimeException dittoRuntimeException,
            final DittoHeaders dittoHeaders); static PolicyErrorResponse of(final DittoRuntimeException dittoRuntimeException); @Deprecated static PolicyErrorResponse of(final String policyId, final DittoRuntimeException dittoRuntimeException); static PolicyErrorResponse of(final PolicyId policyId, final DittoRuntimeException dittoRuntimeException); static PolicyErrorResponse of(final DittoRuntimeException dittoRuntimeException,
            final DittoHeaders dittoHeaders); @Deprecated static PolicyErrorResponse of(final String policyId, final DittoRuntimeException dittoRuntimeException,
            final DittoHeaders dittoHeaders); static PolicyErrorResponse of(final PolicyId policyId, final DittoRuntimeException dittoRuntimeException,
            final DittoHeaders dittoHeaders); static PolicyErrorResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static PolicyErrorResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override PolicyId getEntityId(); @Override DittoRuntimeException getDittoRuntimeException(); @Override JsonPointer getResourcePath(); @Override PolicyErrorResponse setDittoHeaders(final DittoHeaders dittoHeaders); @Override boolean equals(@Nullable final Object o); @Override int hashCode(); @Override String toString(); static final String TYPE; }
@Test public void createInstanceFromValidJson() { final PolicyErrorResponse underTest = PolicyErrorResponse.fromJson(KNOWN_JSON, TestConstants.EMPTY_DITTO_HEADERS); assertThat(underTest).isNotNull(); }