retrieving the object from optional object

This commit is contained in:
Ankur Gupta 2020-07-30 03:05:16 +05:30
parent cd3ea37b6b
commit 75df0b0778
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ public class AzurecosmodbApplicationManualTest {
productRepository.save(product);
Optional<Product> retrievedProduct = productRepository.findById("1001", new PartitionKey("Shirt"));
Assert.notNull(retrievedProduct, "Retrieved Product is Null");
Assert.notNull(retrievedProduct.get(), "Retrieved Product is Null");
}