class OffsetRepository {

    public void createOrUpdateOffset(int tenant, String strategy, String collection, long offset) {

        Bson offsetFilter = and(
            eq("_tenant", tenant),
            eq("strategy", strategy),
            eq("collection", collection)
        );

        Bson offsetUpdate = Updates.set("offset", offset);

        UpdateOptions updateOptions = new UpdateOptions();
        updateOptions.upsert(true);

        offerCollection.updateOne(offsetFilter, offsetUpdate, updateOptions);
    }

    @VisibleForTesting public  OffsetRepository(MongoDbAccess mongoDbAccess, String collectionName);
    public  OffsetRepository(MongoDbAccess mongoDbAccess);

}