CassandraMailboxPathDAOImpl { public Mono<CassandraIdAndPath> retrieveId(MailboxPath mailboxPath) { return cassandraAsyncExecutor.executeSingleRow( select.bind() .setUDTValue(NAMESPACE_AND_USER, mailboxBaseTupleUtil.createMailboxBaseUDT(mailboxPath.getNamespace(), mailboxPath.getUser())) .setString(MAILBOX_NAME, mailboxPath.getName()) .setConsistencyLevel(consistencyLevel)) .map(this::fromRowToCassandraIdAndPath) .map(FunctionalUtils.toFunction(this::logGhostMailboxSuccess)) .switchIfEmpty(ReactorUtils.executeAndEmpty(() -> logGhostMailboxFailure(mailboxPath))); } @Inject  CassandraMailboxPathDAOImpl(Session session, CassandraTypesProvider typesProvider,
                                       CassandraUtils cassandraUtils,
                                       CassandraConsistenciesConfiguration consistenciesConfiguration); @VisibleForTesting  CassandraMailboxPathDAOImpl(Session session, CassandraTypesProvider typesProvider,
                                       CassandraConsistenciesConfiguration consistenciesConfiguration); Mono<CassandraIdAndPath> retrieveId(MailboxPath mailboxPath); Flux<CassandraIdAndPath> listUserMailboxes(String namespace, Username user); void logGhostMailboxSuccess(CassandraIdAndPath value); void logGhostMailboxFailure(MailboxPath mailboxPath); @VisibleForTesting Mono<Boolean> save(MailboxPath mailboxPath, CassandraId mailboxId); Mono<Void> delete(MailboxPath mailboxPath); Flux<CassandraIdAndPath> readAll(); Mono<Long> countAll();  }
@Test void retrieveIdShouldReturnEmptyWhenEmptyData() { assertThat(testee.retrieveId(USER_INBOX_MAILBOXPATH).blockOptional()) .isEmpty(); }