bvahdat commented on code in PR #9339:
URL: https://github.com/apache/camel/pull/9339#discussion_r1104704179


##########
test-infra/camel-test-infra-core/src/test/java/org/apache/camel/test/infra/core/DefaultAnnotationProcessor.java:
##########
@@ -151,13 +152,12 @@ private void doInvokeFixture(Annotation annotation, Field 
field, Object instance
                 if (field.getType() == MockEndpoint.class) {
                     final MockEndpoint mockEndpoint = 
contextExtension.getMockEndpoint(uri);
 
-                    assert mockEndpoint != null;
-
+                    ObjectHelper.notNull(mockEndpoint, "mockEndpoint");
                     field.set(instance, mockEndpoint);
                 } else {
                     final Endpoint endpoint = context.getEndpoint(uri);
 
-                    assert endpoint != null;
+                    ObjectHelper.notNull(endpoint, "endpoint");

Review Comment:
   I think [the message 
here](https://github.com/apache/camel/blob/camel-4.0.0-M1/core/camel-util/src/main/java/org/apache/camel/util/ObjectHelper.java#L156)
 would be clear enough as:
   
   ```
   endpoint must be specified
   ``` 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to