<feature/sync-engine> change from insert to insertOrReplace #138
<feature/sync-engine> move shared code to base class #138