PolicyInvalidException extends DittoRuntimeException implements ThingException { public static PolicyInvalidException fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) { return DittoRuntimeException.fromJson(jsonObject, dittoHeaders, new Builder()); } private  PolicyInvalidException(final DittoHeaders dittoHeaders,
            @Nullable final String message,
            @Nullable final String description,
            @Nullable final Throwable cause,
            @Nullable final URI href); static Builder newBuilder(final Collection<String> permissions, final ThingId thingId); static Builder newBuilderForCause(final Throwable cause, final ThingId thingId); static PolicyInvalidException fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override JsonSchemaVersion[] getSupportedSchemaVersions(); static final String ERROR_CODE; }
@Test public void createInstanceFromValidJson() { final PolicyInvalidException underTest = PolicyInvalidException.fromJson(KNOWN_JSON, DittoHeaders.empty()); DittoBaseAssertions.assertThat(underTest).isEqualTo(TestConstants.Thing.POLICY_INVALID_EXCEPTION); }