DeleteResourceResponse extends AbstractCommandResponse<DeleteResourceResponse> implements PolicyModifyCommandResponse<DeleteResourceResponse> { @Deprecated public static DeleteResourceResponse of(final String policyId, final Label label, final ResourceKey resourceKey, final DittoHeaders dittoHeaders) { return of(PolicyId.of(policyId), label, resourceKey, dittoHeaders); } private  DeleteResourceResponse(final PolicyId policyId,
            final Label label,
            final ResourceKey resourceKey,
            final HttpStatusCode statusCode,
            final DittoHeaders dittoHeaders); @Deprecated static DeleteResourceResponse of(final String policyId,
            final Label label,
            final ResourceKey resourceKey,
            final DittoHeaders dittoHeaders); static DeleteResourceResponse of(final PolicyId policyId,
            final Label label,
            final ResourceKey resourceKey,
            final DittoHeaders dittoHeaders); static DeleteResourceResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static DeleteResourceResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override PolicyId getEntityId(); Label getLabel(); ResourceKey getResourceKey(); @Override JsonPointer getResourcePath(); @Override DeleteResourceResponse 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 DeleteResourceResponse underTestCreated = DeleteResourceResponse.of(TestConstants.Policy.POLICY_ID, TestConstants.Policy.LABEL, TestConstants.Policy.RESOURCE_KEY, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJsonCreated = underTestCreated.toJson(FieldType.regularOrSpecial()); assertThat(actualJsonCreated).isEqualTo(KNOWN_JSON); }