class LuceneAspspRepository implements AspspRepository {

    @Override
    public Optional<Aspsp> findById(String id) {
        logger.debug("Searching for ASPSPs: by ID [{}]", id);
        List<Aspsp> aspsps = find(new TermQuery(new Term(ID_FIELD_NAME, id)), null, 1);
        if (aspsps.isEmpty()) {
            return Optional.empty();
        }
        return Optional.of(aspsps.get(0));
    }

    public  LuceneAspspRepository(Directory directory);

}