CleanupPersistence extends AbstractCommand<CleanupPersistence> implements CleanupCommand<CleanupPersistence> { public static CleanupPersistence of(final EntityId entityId, final DittoHeaders dittoHeaders) { return new CleanupPersistence(entityId, dittoHeaders); } private  CleanupPersistence(final EntityId entityId, final DittoHeaders dittoHeaders); static CleanupPersistence of(final EntityId entityId, final DittoHeaders dittoHeaders); @Override EntityId getEntityId(); @Override CleanupPersistence setDittoHeaders(final DittoHeaders dittoHeaders); static CleanupPersistence 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 = CleanupPersistence.of(ID, DittoHeaders.empty()).toJson(); assertThat(jsonObject).isEqualTo(KNOWN_JSON); }