### Question:
LuceneAspspRepository implements AspspRepository { @Override public void deleteById(String aspspId) { IndexWriterConfig indexWriterConfig = new IndexWriterConfig(); try (IndexWriter indexWriter = new IndexWriter(directory, indexWriterConfig)) { indexWriter.deleteDocuments(new Term(ID_FIELD_NAME, aspspId)); } catch (IOException e) { throw new RegistryIOException(e); } } LuceneAspspRepository(Directory directory); Aspsp save(Aspsp aspsp); @Override void deleteById(String aspspId); @Override void deleteAll(); @Override void saveAll(List<Aspsp> aspsps); @Override Optional<Aspsp> findById(String id); @Override List<Aspsp> findByBic(String bic, String after, int size); @Override List<Aspsp> findByBankCode(String bankCode, String after, int size); @Override List<Aspsp> findByName(String name, String after, int size); @Override List<Aspsp> findAll(String after, int size); @Override List<Aspsp> findLike(Aspsp aspsp, String after, int size); @Override List<Aspsp> findByIban(String iban, String after, int size);  }### Answer:
@Test void deleteById() { Aspsp aspsp = new Aspsp(); aspsp.setId(ASPSP_ID); luceneAspspRepository.save(aspsp); List<Aspsp> all = luceneAspspRepository.findAll(AspspReadOnlyRepository.DEFAULT_SIZE); assertThat(all).hasSize(1); luceneAspspRepository.deleteById(ASPSP_ID); Optional<Aspsp> aspsp1 = luceneAspspRepository.findById(ASPSP_ID); assertThat(aspsp1).isNotPresent(); }