class OffsetRepository {

    public long findOffsetBy(int tenant, String strategy, String collection) {
        Bson offsetFilter = and(
            eq("_tenant", tenant),
            eq("strategy", strategy),
            eq("collection", collection)
        );
        FindIterable<Document> documents = offerCollection.find(offsetFilter);

        Document first = documents.first();
        if (first == null) {
            return 0L;
        }

        return first.get("offset", Long.class);
    }

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

}