JiriOndrusek commented on a change in pull request #3572:
URL: https://github.com/apache/camel-quarkus/pull/3572#discussion_r814820682



##########
File path: 
integration-tests/bean-validator/src/main/java/org/apache/camel/quarkus/component/bean/validator/it/BeanValidatorResource.java
##########
@@ -39,13 +40,36 @@
     @Inject
     ProducerTemplate producerTemplate;
 
-    @Path("/get/{manufactor}/{plate}")
+    @Inject
+    ValidatorFactoryCustomizer.MyMessageInterpolator messageInterpolator;
+
+    @Path("/get/xml/{manufactor}/{plate}")
     @GET
     @Produces(MediaType.TEXT_PLAIN)
-    public Response get(@PathParam("manufactor") String manufactor, 
@PathParam("plate") String plate) throws Exception {
-        LOG.info("bean-validator: " + manufactor + "/" + plate);
-        Car car = new Car(manufactor, plate);
-        Exchange out = producerTemplate.request("direct:start", e -> 
e.getMessage().setBody(car));
+    public Response getXml(@PathParam("manufactor") String manufactor, 
@PathParam("plate") String plate) throws Exception {
+        return get(new CarWithAnnotations(manufactor, plate), "start");
+    }
+

Review comment:
       There is an error in the test code, one method should use 
`CarWithAnnotations` and the other `CarWithoutAnnotations`.
   Thanks for noticing it! (current code does not verify one configuration 
option) 
   I'll fix it.
   
   --- EDIT ---
   ~~There is no actual problem with the code. But I'll refactor the methods to 
be more self explaining. (and to remove method with the same signature)~~




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to