@Test void retrieveMessageIdsShouldReturnEmptyWhenNone() { Stream<MessageId> messageIds = testee.retrieveMessageIds(BUCKET_NAME, USERNAME).toStream(); assertThat(messageIds).isEmpty(); }
Flux<MessageId> retrieveMessageIds(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readMessageIdStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(MESSAGE_ID)) .map(messageIdFactory::fromString); }
MetadataDAO { Flux<MessageId> retrieveMessageIds(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readMessageIdStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(MESSAGE_ID)) .map(messageIdFactory::fromString); } }
MetadataDAO { Flux<MessageId> retrieveMessageIds(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readMessageIdStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(MESSAGE_ID)) .map(messageIdFactory::fromString); } @Inject  MetadataDAO(Session session, MessageId.Factory messageIdFactory, MetadataSerializer metadataSerializer); }
MetadataDAO { Flux<MessageId> retrieveMessageIds(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readMessageIdStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(MESSAGE_ID)) .map(messageIdFactory::fromString); } @Inject  MetadataDAO(Session session, MessageId.Factory messageIdFactory, MetadataSerializer metadataSerializer);  }
MetadataDAO { Flux<MessageId> retrieveMessageIds(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readMessageIdStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(MESSAGE_ID)) .map(messageIdFactory::fromString); } @Inject  MetadataDAO(Session session, MessageId.Factory messageIdFactory, MetadataSerializer metadataSerializer);   }