class RemitSyncToDBHelper {

    void endAndEnsureToDB(int id) {
        executor.removePostWithId(id);

        try {
            // already synced
            if (executor.isFreeToDatabase(id)) return;

            // force sync for ids
            executor.postSync(id);
        } finally {
            // remove free state
            executor.postRemoveFreeId(id);
        }
    }

      RemitSyncToDBHelper(@NonNull final RemitSyncExecutor.RemitAgent agent);
      RemitSyncToDBHelper(@NonNull final RemitSyncExecutor executor);

}