### Question:
LuceneAspspRepository implements AspspRepository { @Override public void deleteAll() { IndexWriterConfig indexWriterConfig = new IndexWriterConfig(); try (IndexWriter indexWriter = new IndexWriter(directory, indexWriterConfig)) { indexWriter.deleteAll(); } 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 deleteAll() { Aspsp aspsp1 = new Aspsp(); luceneAspspRepository.save(aspsp1); Aspsp aspsp2 = new Aspsp(); luceneAspspRepository.save(aspsp2); List<Aspsp> found = luceneAspspRepository.findAll(); assertThat(found).hasSize(2); luceneAspspRepository.deleteAll(); found = luceneAspspRepository.findAll(); assertThat(found).isEmpty(); }