### Question:
LuceneAspspRepository implements AspspRepository { public Aspsp save(Aspsp aspsp) { IndexWriterConfig indexWriterConfig = new IndexWriterConfig(); try (IndexWriter indexWriter = new IndexWriter(directory, indexWriterConfig)) { return save(indexWriter, aspsp); } 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 saveCanHandleNullProperties() { try { luceneAspspRepository.save(new Aspsp()); } catch (Throwable e) { fail("expect no exceptions"); } }
@Test void saveTreatsEmptyIdAsNull() { Aspsp aspsp = new Aspsp(); aspsp.setId(""); Aspsp saved = luceneAspspRepository.save(aspsp); assertThat(saved.getId()).isNotEmpty(); }