You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/04/03 13:49:39 UTC

[camel-quarkus] branch 4447/java-joor-improve-test-coverage created (now 8ab3be7500)

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

nfilotto pushed a change to branch 4447/java-joor-improve-test-coverage
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


      at 8ab3be7500 Ref #4447 - java-joor-dsl - Improve the test coverage

This branch includes the following new commits:

     new a3c989835e Ref #4731: java-joor-dsl - Add support of anonymous classes
     new 6929bd5f66 Ref #4716: java-joor-dsl - Support RegisterForReflection for the current class
     new 8ab3be7500 Ref #4447 - java-joor-dsl - Improve the test coverage

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel-quarkus] 01/03: Ref #4731: java-joor-dsl - Add support of anonymous classes

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch 4447/java-joor-improve-test-coverage
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit a3c989835e777f301eee893869f7939650f0a69c
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Mon Apr 3 15:41:14 2023 +0200

    Ref #4731: java-joor-dsl - Add support of anonymous classes
---
 .../quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/extensions/java-joor-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java b/extensions/java-joor-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java
index a7527a54c4..433391cfb3 100644
--- a/extensions/java-joor-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java
+++ b/extensions/java-joor-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java
@@ -107,6 +107,16 @@ public class JavaJoorDslProcessor {
                         .produce(new JavaJoorGeneratedClassBuildItem(name, nameToResource.get(className).getLocation(),
                                 result.getByteCode(name)));
             }
+            for (int i = 1;; i++) {
+                String name = String.format("%s$%d", className, i);
+                byte[] content = result.getByteCode(name);
+                if (content == null) {
+                    break;
+                }
+                generatedClass
+                        .produce(new JavaJoorGeneratedClassBuildItem(name, nameToResource.get(className).getLocation(),
+                                content));
+            }
             registerForReflection(reflectiveClass, lambdaCapturingTypeProducer,
                     aClass.getAnnotation(RegisterForReflection.class));
         }


[camel-quarkus] 02/03: Ref #4716: java-joor-dsl - Support RegisterForReflection for the current class

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch 4447/java-joor-improve-test-coverage
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 6929bd5f668757a79ade3ac7882be65d94d23da9
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Mon Apr 3 15:43:09 2023 +0200

    Ref #4716: java-joor-dsl - Support RegisterForReflection for the current class
---
 .../java/joor/deployment/JavaJoorDslProcessor.java | 36 ++++++++++++++--------
 1 file changed, 23 insertions(+), 13 deletions(-)

diff --git a/extensions/java-joor-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java b/extensions/java-joor-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java
index 433391cfb3..b149b67cbe 100644
--- a/extensions/java-joor-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java
+++ b/extensions/java-joor-dsl/deployment/src/main/java/org/apache/camel/quarkus/dsl/java/joor/deployment/JavaJoorDslProcessor.java
@@ -101,12 +101,14 @@ public class JavaJoorDslProcessor {
                     .produce(new JavaJoorGeneratedClassBuildItem(className, nameToResource.get(className).getLocation(),
                             result.getByteCode(className)));
             Class<?> aClass = result.getClass(className);
+            // Inner classes
             for (Class<?> clazz : aClass.getDeclaredClasses()) {
                 String name = clazz.getName();
                 generatedClass
                         .produce(new JavaJoorGeneratedClassBuildItem(name, nameToResource.get(className).getLocation(),
                                 result.getByteCode(name)));
             }
+            // Anonymous classes
             for (int i = 1;; i++) {
                 String name = String.format("%s$%d", className, i);
                 byte[] content = result.getByteCode(name);
@@ -117,14 +119,13 @@ public class JavaJoorDslProcessor {
                         .produce(new JavaJoorGeneratedClassBuildItem(name, nameToResource.get(className).getLocation(),
                                 content));
             }
-            registerForReflection(reflectiveClass, lambdaCapturingTypeProducer,
-                    aClass.getAnnotation(RegisterForReflection.class));
+            registerForReflection(reflectiveClass, lambdaCapturingTypeProducer, aClass);
         }
     }
 
     private void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
-            BuildProducer<LambdaCapturingTypeBuildItem> lambdaCapturingTypeProducer,
-            RegisterForReflection annotation) {
+            BuildProducer<LambdaCapturingTypeBuildItem> lambdaCapturingTypeProducer, Class<?> aClass) {
+        RegisterForReflection annotation = aClass.getAnnotation(RegisterForReflection.class);
         if (annotation == null) {
             return;
         }
@@ -142,18 +143,28 @@ public class JavaJoorDslProcessor {
             LOG.warn(
                     "The element 'registerFullHierarchy' of the annotation 'RegisterForReflection' is not supported by the extension Camel Java jOOR DSL");
         }
-        for (Class<?> type : annotation.targets()) {
-            registerClass(type.getName(), methods, fields, ignoreNested, serialization,
+        Class<?>[] targets = annotation.targets();
+        String[] classNames = annotation.classNames();
+        if (targets.length == 0 && classNames.length == 0) {
+            // No target and classname set, the target is then the class itself
+            registerClass(aClass, aClass.getName(), methods, fields, ignoreNested, serialization,
+                    unsafeAllocated, reflectiveClass);
+            return;
+        }
+
+        for (Class<?> type : targets) {
+            registerClass(type, type.getName(), methods, fields, ignoreNested, serialization,
                     unsafeAllocated, reflectiveClass);
         }
 
-        for (String className : annotation.classNames()) {
-            registerClass(className, methods, fields, ignoreNested, serialization, unsafeAllocated,
+        for (String className : classNames) {
+            registerClass(null, className, methods, fields, ignoreNested, serialization, unsafeAllocated,
                     reflectiveClass);
         }
     }
 
-    private void registerClass(String className, boolean methods, boolean fields, boolean ignoreNested, boolean serialization,
+    private void registerClass(Class<?> type, String className, boolean methods, boolean fields, boolean ignoreNested,
+            boolean serialization,
             boolean unsafeAllocated, BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
         reflectiveClass.produce(serialization
                 ? ReflectiveClassBuildItem.builder(className).serialization().unsafeAllocated(unsafeAllocated).build()
@@ -165,10 +176,9 @@ public class JavaJoorDslProcessor {
         }
 
         try {
-            Class<?>[] declaredClasses = Thread.currentThread().getContextClassLoader().loadClass(className)
-                    .getDeclaredClasses();
-            for (Class<?> clazz : declaredClasses) {
-                registerClass(clazz.getName(), methods, fields, false, serialization, unsafeAllocated,
+            Class<?> aClass = type == null ? Thread.currentThread().getContextClassLoader().loadClass(className) : type;
+            for (Class<?> clazz : aClass.getDeclaredClasses()) {
+                registerClass(clazz, clazz.getName(), methods, fields, false, serialization, unsafeAllocated,
                         reflectiveClass);
             }
         } catch (ClassNotFoundException e) {


[camel-quarkus] 03/03: Ref #4447 - java-joor-dsl - Improve the test coverage

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch 4447/java-joor-improve-test-coverage
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 8ab3be75005c741caf0f211788204bf16d4b23ec
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Mon Apr 3 15:44:10 2023 +0200

    Ref #4447 - java-joor-dsl - Improve the test coverage
---
 integration-tests/java-joor-dsl/pom.xml            | 51 ++++++++++++++++++++++
 .../quarkus/dsl/java/joor/JavaJoorDslResource.java | 21 +++++++++
 .../src/main/resources/application.properties      |  2 +-
 .../src/main/resources/routes/MyBar.java           | 29 ++++++++++++
 .../src/main/resources/routes/MyBarEcho.java       | 30 +++++++++++++
 .../src/main/resources/routes/MyBarRoute.java      | 28 ++++++++++++
 .../main/resources/routes/MyRoutesWithBeans.java   | 38 ++++++++++++++++
 .../main/resources/routes/MyRoutesWithModel.java   | 36 +++++++++++++++
 .../resources/routes/MyRoutesWithNestedClass.java  | 40 +++++++++++++++++
 .../src/main/resources/routes/MyUser.java          | 46 +++++++++++++++++++
 .../quarkus/dsl/java/joor/JavaJoorDslTest.java     | 21 ++++++++-
 11 files changed, 340 insertions(+), 2 deletions(-)

diff --git a/integration-tests/java-joor-dsl/pom.xml b/integration-tests/java-joor-dsl/pom.xml
index 06b6b518b3..667972e6c6 100644
--- a/integration-tests/java-joor-dsl/pom.xml
+++ b/integration-tests/java-joor-dsl/pom.xml
@@ -39,6 +39,18 @@
             <groupId>org.apache.camel.quarkus</groupId>
             <artifactId>camel-quarkus-direct</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-jackson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-bean</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-rest</artifactId>
+        </dependency>
         <dependency>
             <groupId>io.quarkus</groupId>
             <artifactId>quarkus-resteasy</artifactId>
@@ -72,6 +84,19 @@
             </activation>
             <dependencies>
                 <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory -->
+                <dependency>
+                    <groupId>org.apache.camel.quarkus</groupId>
+                    <artifactId>camel-quarkus-bean-deployment</artifactId>
+                    <version>${project.version}</version>
+                    <type>pom</type>
+                    <scope>test</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>*</groupId>
+                            <artifactId>*</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
                 <dependency>
                     <groupId>org.apache.camel.quarkus</groupId>
                     <artifactId>camel-quarkus-direct-deployment</artifactId>
@@ -98,6 +123,32 @@
                         </exclusion>
                     </exclusions>
                 </dependency>
+                <dependency>
+                    <groupId>org.apache.camel.quarkus</groupId>
+                    <artifactId>camel-quarkus-jackson-deployment</artifactId>
+                    <version>${project.version}</version>
+                    <type>pom</type>
+                    <scope>test</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>*</groupId>
+                            <artifactId>*</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.camel.quarkus</groupId>
+                    <artifactId>camel-quarkus-rest-deployment</artifactId>
+                    <version>${project.version}</version>
+                    <type>pom</type>
+                    <scope>test</scope>
+                    <exclusions>
+                        <exclusion>
+                            <groupId>*</groupId>
+                            <artifactId>*</artifactId>
+                        </exclusion>
+                    </exclusions>
+                </dependency>
             </dependencies>
         </profile>
         <profile>
diff --git a/integration-tests/java-joor-dsl/src/main/java/org/apache/camel/quarkus/dsl/java/joor/JavaJoorDslResource.java b/integration-tests/java-joor-dsl/src/main/java/org/apache/camel/quarkus/dsl/java/joor/JavaJoorDslResource.java
index f29c0dba1b..7c46b57744 100644
--- a/integration-tests/java-joor-dsl/src/main/java/org/apache/camel/quarkus/dsl/java/joor/JavaJoorDslResource.java
+++ b/integration-tests/java-joor-dsl/src/main/java/org/apache/camel/quarkus/dsl/java/joor/JavaJoorDslResource.java
@@ -16,8 +16,10 @@
  */
 package org.apache.camel.quarkus.dsl.java.joor;
 
+import java.util.Set;
 import java.util.stream.Collectors;
 
+import io.quarkus.runtime.annotations.RegisterForReflection;
 import jakarta.enterprise.context.ApplicationScoped;
 import jakarta.inject.Inject;
 import jakarta.ws.rs.Consumes;
@@ -29,10 +31,12 @@ import jakarta.ws.rs.core.MediaType;
 import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.Route;
+import org.apache.camel.component.direct.DirectEndpoint;
 import org.apache.camel.dsl.java.joor.JavaRoutesBuilderLoader;
 import org.apache.camel.quarkus.main.CamelMain;
 import org.apache.camel.spi.RoutesBuilderLoader;
 
+@RegisterForReflection(targets = String.class)
 @Path("/java-joor-dsl")
 @ApplicationScoped
 public class JavaJoorDslResource {
@@ -71,6 +75,23 @@ public class JavaJoorDslResource {
                 .collect(Collectors.joining(","));
     }
 
+    @GET
+    @Path("/main/successful/routes")
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public int successfulRoutes() {
+        int successful = 0;
+        Set<String> excluded = Set.of("my-java-route", "reflection-route", "inner-classes-route", "routes-with-rest");
+        for (Route route : main.getCamelContext().getRoutes()) {
+            String name = route.getRouteId();
+            if (route.getEndpoint() instanceof DirectEndpoint && !excluded.contains(name)
+                    && Boolean.TRUE.equals(producerTemplate.requestBody(route.getEndpoint(), "", Boolean.class))) {
+                successful++;
+            }
+        }
+        return successful;
+    }
+
     @POST
     @Path("/hello")
     @Consumes(MediaType.TEXT_PLAIN)
diff --git a/integration-tests/java-joor-dsl/src/main/resources/application.properties b/integration-tests/java-joor-dsl/src/main/resources/application.properties
index 0b17e9e265..e03850aeee 100644
--- a/integration-tests/java-joor-dsl/src/main/resources/application.properties
+++ b/integration-tests/java-joor-dsl/src/main/resources/application.properties
@@ -18,4 +18,4 @@
 #
 # Main
 #
-camel.main.routes-include-pattern = classpath:routes/MyRoutes.java
+camel.main.routes-include-pattern = classpath:routes/*.java
diff --git a/integration-tests/java-joor-dsl/src/main/resources/routes/MyBar.java b/integration-tests/java-joor-dsl/src/main/resources/routes/MyBar.java
new file mode 100644
index 0000000000..2bf03dcf76
--- /dev/null
+++ b/integration-tests/java-joor-dsl/src/main/resources/routes/MyBar.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class MyBar {
+
+    private String name;
+
+    public MyBar(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+}
\ No newline at end of file
diff --git a/integration-tests/java-joor-dsl/src/main/resources/routes/MyBarEcho.java b/integration-tests/java-joor-dsl/src/main/resources/routes/MyBarEcho.java
new file mode 100644
index 0000000000..f2efc91170
--- /dev/null
+++ b/integration-tests/java-joor-dsl/src/main/resources/routes/MyBarEcho.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import io.quarkus.runtime.annotations.RegisterForReflection;
+import org.apache.camel.BindToRegistry;
+
+@RegisterForReflection
+@BindToRegistry("myBarEcho")
+public class MyBarEcho {
+
+    private MyBar bar = new MyBar("Moes Bar");
+
+    public String echo(String s) {
+        return s + " is at " + bar.getName();
+    }
+
+}
\ No newline at end of file
diff --git a/integration-tests/java-joor-dsl/src/main/resources/routes/MyBarRoute.java b/integration-tests/java-joor-dsl/src/main/resources/routes/MyBarRoute.java
new file mode 100644
index 0000000000..202f18d0fb
--- /dev/null
+++ b/integration-tests/java-joor-dsl/src/main/resources/routes/MyBarRoute.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import org.apache.camel.builder.RouteBuilder;
+
+public class MyBarRoute extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:routes-with-bean")
+                .id("routes-with-bean")
+                .bean("myBarEcho")
+                .setBody().simple("${body.endsWith(' is at Moes Bar')}");
+    }
+}
\ No newline at end of file
diff --git a/integration-tests/java-joor-dsl/src/main/resources/routes/MyRoutesWithBeans.java b/integration-tests/java-joor-dsl/src/main/resources/routes/MyRoutesWithBeans.java
new file mode 100644
index 0000000000..3896398a32
--- /dev/null
+++ b/integration-tests/java-joor-dsl/src/main/resources/routes/MyRoutesWithBeans.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import io.quarkus.runtime.annotations.RegisterForReflection;
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.builder.RouteBuilder;
+
+@RegisterForReflection(ignoreNested = false)
+public class MyRoutesWithBeans extends RouteBuilder {
+    @Override
+    public void configure() throws Exception {
+        from("direct:routes-with-inner-bean")
+            .id("routes-with-inner-bean")
+            .bean("myBean")
+            .setBody().simple("${body.endsWith('John!')}");
+    }
+
+    @BindToRegistry("myBean")
+    public static class MyBean {
+
+        public String hi() {
+            return "Hi John!";
+        }
+    }
+}
\ No newline at end of file
diff --git a/integration-tests/java-joor-dsl/src/main/resources/routes/MyRoutesWithModel.java b/integration-tests/java-joor-dsl/src/main/resources/routes/MyRoutesWithModel.java
new file mode 100644
index 0000000000..c5997b823b
--- /dev/null
+++ b/integration-tests/java-joor-dsl/src/main/resources/routes/MyRoutesWithModel.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.model.dataformat.JsonLibrary;
+
+public class MyRoutesWithModel extends RouteBuilder {
+    @Override
+    public void configure() throws Exception {
+        rest("/say")
+            .get("/emp/{id}")
+                .id("routes-with-rest-get")
+                .produces("application/json")
+                .outType(MyUser.class)
+                .to("direct:routes-with-rest");
+
+        from("direct:routes-with-rest")
+            .id("routes-with-rest")
+            .process(exchange -> exchange.getMessage().setBody(new MyUser("Bruce", 68)))
+            .marshal().json(JsonLibrary.Jackson);
+    }
+}
\ No newline at end of file
diff --git a/integration-tests/java-joor-dsl/src/main/resources/routes/MyRoutesWithNestedClass.java b/integration-tests/java-joor-dsl/src/main/resources/routes/MyRoutesWithNestedClass.java
new file mode 100644
index 0000000000..aaac2f15e9
--- /dev/null
+++ b/integration-tests/java-joor-dsl/src/main/resources/routes/MyRoutesWithNestedClass.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+
+public class MyRoutesWithNestedClass extends RouteBuilder {
+    @Override
+    public void configure() throws Exception {
+        Processor toUpper = new Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                String body = exchange.getIn().getBody(String.class);
+                body = body.toUpperCase();
+
+                exchange.getMessage().setBody(body);
+            }
+        };
+
+        from("direct:routes-with-nested-class")
+            .id("routes-with-nested-class")
+            .setBody().constant("Some Content")
+            .process(toUpper)
+            .setBody().simple("${body.endsWith('CONTENT')}");
+    }
+}
\ No newline at end of file
diff --git a/integration-tests/java-joor-dsl/src/main/resources/routes/MyUser.java b/integration-tests/java-joor-dsl/src/main/resources/routes/MyUser.java
new file mode 100644
index 0000000000..104791b080
--- /dev/null
+++ b/integration-tests/java-joor-dsl/src/main/resources/routes/MyUser.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import io.quarkus.runtime.annotations.RegisterForReflection;
+
+@RegisterForReflection
+public class MyUser {
+
+    private String name;
+    private int age;
+
+    public MyUser(String name, int age) {
+        this.name = name;
+        this.age = age;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+}
diff --git a/integration-tests/java-joor-dsl/src/test/java/org/apache/camel/quarkus/dsl/java/joor/JavaJoorDslTest.java b/integration-tests/java-joor-dsl/src/test/java/org/apache/camel/quarkus/dsl/java/joor/JavaJoorDslTest.java
index 52bfde5bbd..38998a3cb5 100644
--- a/integration-tests/java-joor-dsl/src/test/java/org/apache/camel/quarkus/dsl/java/joor/JavaJoorDslTest.java
+++ b/integration-tests/java-joor-dsl/src/test/java/org/apache/camel/quarkus/dsl/java/joor/JavaJoorDslTest.java
@@ -22,6 +22,8 @@ import org.apache.camel.dsl.java.joor.JavaRoutesBuilderLoader;
 import org.hamcrest.CoreMatchers;
 import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.CoreMatchers.equalTo;
+
 @QuarkusTest
 class JavaJoorDslTest {
 
@@ -73,6 +75,23 @@ class JavaJoorDslTest {
                 .get("/java-joor-dsl/main/routes")
                 .then()
                 .statusCode(200)
-                .body(CoreMatchers.is("inner-classes-route,my-java-route,reflection-route"));
+                .body(CoreMatchers.is(
+                        "inner-classes-route,my-java-route,reflection-route,routes-with-bean,routes-with-inner-bean,routes-with-nested-class,routes-with-rest,routes-with-rest-get"));
+
+        RestAssured.given()
+                .get("/java-joor-dsl/main/successful/routes")
+                .then()
+                .statusCode(200)
+                .body(CoreMatchers.is("3"));
+    }
+
+    @Test
+    void testRestEndpoints() {
+        RestAssured.given()
+                .get("/say/emp/123")
+                .then()
+                .log().ifValidationFails()
+                .statusCode(200)
+                .body("name", equalTo("Bruce"), "age", equalTo(68));
     }
 }