DeletePolicyResponse extends AbstractCommandResponse<DeletePolicyResponse> implements PolicyModifyCommandResponse<DeletePolicyResponse> { public static DeletePolicyResponse of(final PolicyId policyId, final DittoHeaders dittoHeaders) { return new DeletePolicyResponse(policyId, HttpStatusCode.NO_CONTENT, dittoHeaders); } private  DeletePolicyResponse(final PolicyId policyId, final HttpStatusCode statusCode,
            final DittoHeaders dittoHeaders); static DeletePolicyResponse of(final PolicyId policyId, final DittoHeaders dittoHeaders); @Deprecated static DeletePolicyResponse of(final String policyId, final DittoHeaders dittoHeaders); static DeletePolicyResponse fromJson(final String jsonString, final DittoHeaders dittoHeaders); static DeletePolicyResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override PolicyId getEntityId(); @Override JsonPointer getResourcePath(); @Override DeletePolicyResponse 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 DeletePolicyResponse underTest = DeletePolicyResponse.of(TestConstants.Policy.POLICY_ID, TestConstants.EMPTY_DITTO_HEADERS); final JsonObject actualJsonCreated = underTest.toJson(FieldType.regularOrSpecial()); assertThat(actualJsonCreated).isEqualTo(KNOWN_JSON); }