@Test void retrieveMetadataShouldReturnEmptyWhenNone() { Stream<DeletedMessageWithStorageInformation> messageIds = testee.retrieveMetadata(BUCKET_NAME, USERNAME).toStream(); assertThat(messageIds).isEmpty(); }
Flux<DeletedMessageWithStorageInformation> retrieveMetadata(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(PAYLOAD)) .map(metadataSerializer::deserialize) .handle(publishIfPresent()); }
MetadataDAO { Flux<DeletedMessageWithStorageInformation> retrieveMetadata(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(PAYLOAD)) .map(metadataSerializer::deserialize) .handle(publishIfPresent()); } }
MetadataDAO { Flux<DeletedMessageWithStorageInformation> retrieveMetadata(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(PAYLOAD)) .map(metadataSerializer::deserialize) .handle(publishIfPresent()); } @Inject  MetadataDAO(Session session, MessageId.Factory messageIdFactory, MetadataSerializer metadataSerializer); }
MetadataDAO { Flux<DeletedMessageWithStorageInformation> retrieveMetadata(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(PAYLOAD)) .map(metadataSerializer::deserialize) .handle(publishIfPresent()); } @Inject  MetadataDAO(Session session, MessageId.Factory messageIdFactory, MetadataSerializer metadataSerializer);  }
MetadataDAO { Flux<DeletedMessageWithStorageInformation> retrieveMetadata(BucketName bucketName, Username username) { return cassandraAsyncExecutor.executeRows( readStatement.bind() .setString(BUCKET_NAME, bucketName.asString()) .setString(OWNER, username.asString())) .map(row -> row.getString(PAYLOAD)) .map(metadataSerializer::deserialize) .handle(publishIfPresent()); } @Inject  MetadataDAO(Session session, MessageId.Factory messageIdFactory, MetadataSerializer metadataSerializer);   }