This is an automated email from the ASF dual-hosted git repository.

oscerd pushed a commit to branch fix/CAMEL-24342
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 5ac3ff6c1f111fe151d3f7d7ca51d42d21d8742d
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Aug 5 12:05:11 2026 +0200

    CAMEL-24342: align ProducerBlobMetadataTest with project conventions 
(package-private + AssertJ)
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
    Signed-off-by: Andrea Cosentino <[email protected]>
---
 .../storage/unit/ProducerBlobMetadataTest.java     | 27 +++++++++++-----------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git 
a/components/camel-google/camel-google-storage/src/test/java/org/apache/camel/component/google/storage/unit/ProducerBlobMetadataTest.java
 
b/components/camel-google/camel-google-storage/src/test/java/org/apache/camel/component/google/storage/unit/ProducerBlobMetadataTest.java
index 84c9880a7d8a..cf29f3a2b499 100644
--- 
a/components/camel-google/camel-google-storage/src/test/java/org/apache/camel/component/google/storage/unit/ProducerBlobMetadataTest.java
+++ 
b/components/camel-google/camel-google-storage/src/test/java/org/apache/camel/component/google/storage/unit/ProducerBlobMetadataTest.java
@@ -26,10 +26,9 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.google.storage.GoogleCloudStorageConstants;
 import org.junit.jupiter.api.Test;
 
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.assertj.core.api.Assertions.assertThat;
 
-public class ProducerBlobMetadataTest extends GoogleCloudStorageBaseTest {
+class ProducerBlobMetadataTest extends GoogleCloudStorageBaseTest {
 
     private static final String FILE_NAME = "metadata.txt";
 
@@ -48,7 +47,7 @@ public class ProducerBlobMetadataTest extends 
GoogleCloudStorageBaseTest {
     }
 
     @Test
-    public void contentEncodingAndCacheControlAreStoredAsSent() {
+    void contentEncodingAndCacheControlAreStoredAsSent() {
         Exchange exchange = template.request("direct:store", e -> {
             e.getIn().setHeader(GoogleCloudStorageConstants.OBJECT_NAME, 
FILE_NAME);
             e.getIn().setHeader(GoogleCloudStorageConstants.CONTENT_TYPE, 
"text/plain");
@@ -57,24 +56,24 @@ public class ProducerBlobMetadataTest extends 
GoogleCloudStorageBaseTest {
             e.getIn().setBody(new ByteArrayInputStream("Hi, How are you 
?".getBytes()));
         });
 
-        assertNotNull(exchange);
+        assertThat(exchange).isNotNull();
         Blob blob = exchange.getMessage().getBody(Blob.class);
-        assertNotNull(blob);
+        assertThat(blob).isNotNull();
         // each field has to carry its own header value, they used to be 
overwritten with the content type
-        assertEquals("text/plain", blob.getContentType());
-        assertEquals("gzip", blob.getContentEncoding());
-        assertEquals("max-age=3600", blob.getCacheControl());
+        assertThat(blob.getContentType()).isEqualTo("text/plain");
+        assertThat(blob.getContentEncoding()).isEqualTo("gzip");
+        assertThat(blob.getCacheControl()).isEqualTo("max-age=3600");
     }
 
     @Test
-    public void getObjectOnAMissingObjectReportsTheObjectName() {
+    void getObjectOnAMissingObjectReportsTheObjectName() {
         Exchange exchange = template.request("direct:getObject",
                 e -> 
e.getIn().setHeader(GoogleCloudStorageConstants.OBJECT_NAME, 
"there-is-no-such-object.txt"));
 
-        assertNotNull(exchange);
+        assertThat(exchange).isNotNull();
         Exception exception = exchange.getException();
-        assertNotNull(exception, "a missing object must fail the exchange");
-        assertEquals("Object there-is-no-such-object.txt does not exist in 
bucket myCamelBucket",
-                exception.getMessage());
+        assertThat(exception).as("a missing object must fail the 
exchange").isNotNull();
+        assertThat(exception.getMessage())
+                .isEqualTo("Object there-is-no-such-object.txt does not exist 
in bucket myCamelBucket");
     }
 }

Reply via email to