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

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new d3b98ada098b fix(components): lang4j test proper assert type
d3b98ada098b is described below

commit d3b98ada098bd7f741a6223acf6fedebc685c58e
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Tue Dec 9 11:53:00 2025 +0100

    fix(components): lang4j test proper assert type
---
 .../langchain4j/web/search/LangChain4jGoogleWebSearchEngineIT.java    | 4 ++--
 .../langchain4j/web/search/LangChain4jTavilyWebSearchEngineIT.java    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/components/camel-ai/camel-langchain4j-web-search/src/test/java/org/apache/camel/component/langchain4j/web/search/LangChain4jGoogleWebSearchEngineIT.java
 
b/components/camel-ai/camel-langchain4j-web-search/src/test/java/org/apache/camel/component/langchain4j/web/search/LangChain4jGoogleWebSearchEngineIT.java
index 594ce4ffd8cd..c4dfb9b4d1e3 100644
--- 
a/components/camel-ai/camel-langchain4j-web-search/src/test/java/org/apache/camel/component/langchain4j/web/search/LangChain4jGoogleWebSearchEngineIT.java
+++ 
b/components/camel-ai/camel-langchain4j-web-search/src/test/java/org/apache/camel/component/langchain4j/web/search/LangChain4jGoogleWebSearchEngineIT.java
@@ -77,7 +77,7 @@ public class LangChain4jGoogleWebSearchEngineIT extends 
CamelTestSupport {
 
         List<String> listResult = result.getIn().getBody(List.class);
         assertNotNull(listResult, "The list results from the Google Search 
Engine shouldn't be null.");
-        assertNotEquals(0, listResult.get(0),
+        assertNotEquals(0, listResult.size(),
                 "The list results from the Google Search Engine shouldn't be 
empty. It's the value of the snippet as a Strng");
     }
 
@@ -85,6 +85,6 @@ public class LangChain4jGoogleWebSearchEngineIT extends 
CamelTestSupport {
     void advancedRequestTest() {
         List<String> response = template.requestBody(WEB_SEARCH_URI, null, 
List.class);
         assertNotNull(response, "An Exchange is expected.");
-        assertNotEquals(0, response.get(0), "The list results from the Google 
Search Engine shouldn't be empty.");
+        assertNotEquals(0, response.size(), "The list results from the Google 
Search Engine shouldn't be empty.");
     }
 }
diff --git 
a/components/camel-ai/camel-langchain4j-web-search/src/test/java/org/apache/camel/component/langchain4j/web/search/LangChain4jTavilyWebSearchEngineIT.java
 
b/components/camel-ai/camel-langchain4j-web-search/src/test/java/org/apache/camel/component/langchain4j/web/search/LangChain4jTavilyWebSearchEngineIT.java
index 1dc93f532a8a..4bee0b062c90 100644
--- 
a/components/camel-ai/camel-langchain4j-web-search/src/test/java/org/apache/camel/component/langchain4j/web/search/LangChain4jTavilyWebSearchEngineIT.java
+++ 
b/components/camel-ai/camel-langchain4j-web-search/src/test/java/org/apache/camel/component/langchain4j/web/search/LangChain4jTavilyWebSearchEngineIT.java
@@ -73,7 +73,7 @@ public class LangChain4jTavilyWebSearchEngineIT extends 
CamelTestSupport {
 
         List<WebSearchOrganicResult> listResult = 
result.getIn().getBody(List.class);
         assertNotNull(listResult, "The list results from the Tavily Search 
Engine shouldn't be null.");
-        assertNotEquals(0, listResult.get(0), "The list results from the 
Tavily Search Engine shouldn't be empty.");
+        assertNotEquals(0, listResult.size(), "The list results from the 
Tavily Search Engine shouldn't be empty.");
         assertNotNull(listResult.get(0).content(), "The first result from the 
Tavily Search Engine should contain content.");
 
     }
@@ -82,7 +82,7 @@ public class LangChain4jTavilyWebSearchEngineIT extends 
CamelTestSupport {
     void advancedRequestTest() {
         List<String> response = template.requestBody(WEB_SEARCH_URI, null, 
List.class);
         assertNotNull(response, "An Exchange is expected.");
-        assertNotEquals(0, response.get(0), "The list results from the Tavily 
Search Engine shouldn't be empty.");
+        assertNotEquals(0, response.size(), "The list results from the Tavily 
Search Engine shouldn't be empty.");
     }
 
 }

Reply via email to