CleanupPersistenceResponse extends AbstractCommandResponse<CleanupPersistenceResponse> implements CleanupCommandResponse<CleanupPersistenceResponse> { public static CleanupPersistenceResponse success(final EntityId entityId, final DittoHeaders dittoHeaders) { return new CleanupPersistenceResponse(entityId, HttpStatusCode.OK, dittoHeaders); } private  CleanupPersistenceResponse(final EntityId entityId, final HttpStatusCode statusCode,
            final DittoHeaders dittoHeaders); static CleanupPersistenceResponse success(final EntityId entityId, final DittoHeaders dittoHeaders); static CleanupPersistenceResponse failure(final EntityId entityId, final DittoHeaders dittoHeaders); @Override EntityId getEntityId(); @Override CleanupPersistenceResponse setDittoHeaders(final DittoHeaders dittoHeaders); static CleanupPersistenceResponse fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); static final String TYPE; }
@Test public void toJsonReturnsExpected() { final JsonObject jsonObject = CleanupPersistenceResponse.success(ID, DittoHeaders.empty()).toJson(); assertThat(jsonObject).isEqualTo(KNOWN_JSON); }