@Test void retrieveStorageInformationShouldReturnEmptyWhenNone() { Optional<StorageInformation> storageInformation = testee.retrieveStorageInformation(OWNER, MESSAGE_ID).blockOptional(); assertThat(storageInformation).isEmpty(); }
Mono<StorageInformation> retrieveStorageInformation(Username username, MessageId messageId) { return cassandraAsyncExecutor.executeSingleRow(readStatement.bind() .setString(OWNER, username.asString()) .setString(MESSAGE_ID, messageId.serialize())) .map(row -> StorageInformation.builder() .bucketName(BucketName.of(row.getString(BUCKET_NAME))) .blobId(blobIdFactory.from(row.getString(BLOB_ID)))); }
StorageInformationDAO { Mono<StorageInformation> retrieveStorageInformation(Username username, MessageId messageId) { return cassandraAsyncExecutor.executeSingleRow(readStatement.bind() .setString(OWNER, username.asString()) .setString(MESSAGE_ID, messageId.serialize())) .map(row -> StorageInformation.builder() .bucketName(BucketName.of(row.getString(BUCKET_NAME))) .blobId(blobIdFactory.from(row.getString(BLOB_ID)))); } }
StorageInformationDAO { Mono<StorageInformation> retrieveStorageInformation(Username username, MessageId messageId) { return cassandraAsyncExecutor.executeSingleRow(readStatement.bind() .setString(OWNER, username.asString()) .setString(MESSAGE_ID, messageId.serialize())) .map(row -> StorageInformation.builder() .bucketName(BucketName.of(row.getString(BUCKET_NAME))) .blobId(blobIdFactory.from(row.getString(BLOB_ID)))); } @Inject  StorageInformationDAO(Session session, BlobId.Factory blobIdFactory); }
StorageInformationDAO { Mono<StorageInformation> retrieveStorageInformation(Username username, MessageId messageId) { return cassandraAsyncExecutor.executeSingleRow(readStatement.bind() .setString(OWNER, username.asString()) .setString(MESSAGE_ID, messageId.serialize())) .map(row -> StorageInformation.builder() .bucketName(BucketName.of(row.getString(BUCKET_NAME))) .blobId(blobIdFactory.from(row.getString(BLOB_ID)))); } @Inject  StorageInformationDAO(Session session, BlobId.Factory blobIdFactory);  }
StorageInformationDAO { Mono<StorageInformation> retrieveStorageInformation(Username username, MessageId messageId) { return cassandraAsyncExecutor.executeSingleRow(readStatement.bind() .setString(OWNER, username.asString()) .setString(MESSAGE_ID, messageId.serialize())) .map(row -> StorageInformation.builder() .bucketName(BucketName.of(row.getString(BUCKET_NAME))) .blobId(blobIdFactory.from(row.getString(BLOB_ID)))); } @Inject  StorageInformationDAO(Session session, BlobId.Factory blobIdFactory);   }