diff --git a/azure/camel-example-spring-boot-azure-storage-blob/src/test/java/camel/sample/BlobTagsTest.java b/azure/camel-example-spring-boot-azure-storage-blob/src/test/java/camel/sample/BlobTagsTest.java index 4a8142494..66c1fff63 100644 --- a/azure/camel-example-spring-boot-azure-storage-blob/src/test/java/camel/sample/BlobTagsTest.java +++ b/azure/camel-example-spring-boot-azure-storage-blob/src/test/java/camel/sample/BlobTagsTest.java @@ -136,4 +136,21 @@ void testSetAndGetBlobTags() { assertEquals("document", retrieved.get("category")); assertEquals("high", retrieved.get("priority")); } + + @Test + void testFindBlobsByTags() { + uploadTestBlob(); + + Map tags = Map.of("Environment", "Production"); + template.send("direct:setBlobTags", exchange -> { + exchange.getIn().setHeader(BlobConstants.BLOB_NAME, BLOB_NAME); + exchange.getIn().setHeader(BlobConstants.BLOB_TAGS, tags); + }); + + Exchange result = template.send("direct:findBlobsByTags", exchange -> { + exchange.getIn().setHeader(BlobConstants.BLOB_TAG_FILTER, "\"Environment\" = 'Production'"); + }); + assertNull(result.getException(), "findBlobsByTags should succeed: " + result.getException()); + assertNotNull(result.getMessage().getBody(), "Should return results"); + } }