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

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

commit d69066fb8acc302ffa81e5c268e0b527483975ac
Author: Christoph Deppisch <[email protected]>
AuthorDate: Mon Nov 16 11:00:42 2026 +0100

    CAMEL-26852: camel-jbang - upgrade to Citrus 5.2.0 and run its aesh 
commands in the test plugin
    
    Add TestAgent to override GroupCommand dispatch so TestAgentStart is
    actually called by aesh. Configure logging in agent start command and
    make logging setup errors non-fatal in both TestAgentStart and TestRun.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 .../jbang-commands/camel-jbang-test-agent-run.adoc |  43 +++++++
 .../camel-jbang-test-agent-start.adoc              |  44 +++++++
 .../camel-jbang-test-agent-stop.adoc               |  27 +++++
 .../jbang-commands/camel-jbang-test-agent.adoc     |  38 ++++++
 .../jbang-commands/camel-jbang-test-init.adoc      |  28 +++++
 .../jbang-commands/camel-jbang-test-inspect.adoc   |  27 +++++
 .../pages/jbang-commands/camel-jbang-test-ps.adoc  |  29 +++++
 .../pages/jbang-commands/camel-jbang-test-run.adoc |  41 +++++++
 .../pages/jbang-commands/camel-jbang-test.adoc     |  22 ++++
 dsl/camel-jbang/camel-jbang-it/pom.xml             |   4 -
 .../camel-jbang-plugin-commands-metadata.json      |   2 +-
 .../dsl/jbang/core/commands/test/TestAgent.java    |  48 ++++++++
 .../jbang/core/commands/test/TestAgentStart.java   |  53 ++++++++
 .../dsl/jbang/core/commands/test/TestCommand.java  |  17 +--
 .../dsl/jbang/core/commands/test/TestInit.java     |  80 +++++++-----
 .../dsl/jbang/core/commands/test/TestInspect.java  |  40 ++++++
 .../dsl/jbang/core/commands/test/TestPlugin.java   | 134 ++++++---------------
 .../dsl/jbang/core/commands/test/TestRun.java      |  70 +++++++++++
 .../jbang/core/commands/test/TestPluginTest.java   |  41 +++++++
 parent/pom.xml                                     |   2 +-
 20 files changed, 646 insertions(+), 144 deletions(-)

diff --git 
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent-run.adoc
 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent-run.adoc
new file mode 100644
index 000000000000..b9711e302b00
--- /dev/null
+++ 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent-run.adoc
@@ -0,0 +1,43 @@
+
+// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
+= camel test agent run
+
+Runs tests on the agent server
+
+NOTE: This command is provided by the `test` plugin. Install it with `camel 
plugin add test`.
+
+
+== Usage
+
+[source,bash]
+----
+camel test agent run [options]
+----
+
+
+
+== Options
+
+[cols="2,5,1,2",options="header"]
+|===
+| Option | Description | Default | Type
+| `--async` | Run the tests asynchronously and poll the agent for the test 
results (see --polling-interval). |  | boolean
+| `--background` | When enabled the command is not blocking for the test 
result response. |  | boolean
+| `--dep` | Set of additional Maven dependencies that should be loaded with 
the agent. |  | List
+| `--engine` | Name of the test engine that is used to run tests. One of 
junit, junit-jupiter, junit4, testng, cucumber |  | String
+| `--includes` | Includes test name pattern. |  | List
+| `--modules` | Comma delimited list of additional Citrus modules that should 
be loaded with the agent. |  | String
+| `--packages` | Test package name to include in the test run. |  | List
+| `--polling-interval` | Interval used to poll for test results. Only used in 
asynchronous test execution mode. | 2000 | String
+| `--port` | Server port to connect to. |  | String
+| `--property` | Default System property to set before the test run. |  | List
+| `--reset` | Should the test engine reset the suite state for each run. | 
true | String
+| `--test-jar` | Path to a Java archive that holds tests to run. |  | String
+| `--timeout` | Http request timeout. | 60000 | String
+| `--url` | Server endpoint URL to connect to. |  | String
+| `--verbose` | Should the test engine print verbose test summary information. 
| true | String
+| `--work-directory` | The working directory used by the file based test 
engines to load file resources from. |  | String
+| `-h,--help` | Display this help and exit |  | boolean
+|===
+
+
diff --git 
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent-start.adoc
 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent-start.adoc
new file mode 100644
index 000000000000..30c1746d05df
--- /dev/null
+++ 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent-start.adoc
@@ -0,0 +1,44 @@
+
+// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
+= camel test agent start
+
+Starts the Citrus agent as a server
+
+NOTE: This command is provided by the `test` plugin. Install it with `camel 
plugin add test`.
+
+
+== Usage
+
+[source,bash]
+----
+camel test agent start [options]
+----
+
+
+
+== Options
+
+[cols="2,5,1,2",options="header"]
+|===
+| Option | Description | Default | Type
+| `--config-class` | Configuration class name. |  | String
+| `--dep` | Set of additional Maven dependencies that should be loaded with 
the agent. |  | List
+| `--engine` | Name of the test engine that is used to run tests. One of 
junit, junit-jupiter, junit4, testng, cucumber |  | String
+| `--includes` | Includes test name pattern. |  | List
+| `--inspect-code` | When enabled the source code gets analyzed for required 
modules and dependencies that are added to the classpath. | true | String
+| `--modules` | Comma delimited list of additional Citrus modules that should 
be loaded with the agent. |  | String
+| `--offline` | When enabled there will be no attempts to resolve Maven 
artifacts via internet connection. |  | String
+| `--packages` | Test package name to include in the test run. |  | List
+| `--port` | Server port. |  | String
+| `--property` | Default System property to set before the test run. |  | List
+| `--reset` | Should the test engine reset the suite state for each run. | 
true | String
+| `--skip-tests` | Should the server skip the test run at startup. |  | String
+| `--system-exit` | Should the server exit based on success or failure of the 
test run. |  | String
+| `--test-jar` | Path to a Java archive that holds tests to run. |  | String
+| `--time-to-live` | If this time is set the server automatically terminates 
after the given time. |  | String
+| `--verbose` | Should the test engine print verbose test summary information. 
| true | String
+| `--work-directory` | The working directory used by the file based test 
engines to load file resources from. |  | String
+| `-h,--help` | Display this help and exit |  | boolean
+|===
+
+
diff --git 
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent-stop.adoc
 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent-stop.adoc
new file mode 100644
index 000000000000..4feb770c41e0
--- /dev/null
+++ 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent-stop.adoc
@@ -0,0 +1,27 @@
+
+// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
+= camel test agent stop
+
+Stop the Citrus agent service
+
+NOTE: This command is provided by the `test` plugin. Install it with `camel 
plugin add test`.
+
+
+== Usage
+
+[source,bash]
+----
+camel test agent stop [options]
+----
+
+
+
+== Options
+
+[cols="2,5,1,2",options="header"]
+|===
+| Option | Description | Default | Type
+| `-h,--help` | Display this help and exit |  | boolean
+|===
+
+
diff --git 
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent.adoc
 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent.adoc
new file mode 100644
index 000000000000..69be2f6aa8cf
--- /dev/null
+++ 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-agent.adoc
@@ -0,0 +1,38 @@
+
+// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
+= camel test agent
+
+Manage Citrus agents
+
+NOTE: This command is provided by the `test` plugin. Install it with `camel 
plugin add test`.
+
+
+== Usage
+
+[source,bash]
+----
+camel test agent [options]
+----
+
+
+== Subcommands
+
+[cols="2,5",options="header"]
+|===
+| Subcommand | Description
+| xref:jbang-commands/camel-jbang-test-agent-run.adoc[run] | Runs tests on the 
agent server
+| xref:jbang-commands/camel-jbang-test-agent-start.adoc[start] | Starts the 
Citrus agent as a server
+| xref:jbang-commands/camel-jbang-test-agent-stop.adoc[stop] | Stop the Citrus 
agent service
+|===
+
+
+
+== Options
+
+[cols="2,5,1,2",options="header"]
+|===
+| Option | Description | Default | Type
+| `-h,--help` | Display this help and exit |  | boolean
+|===
+
+
diff --git 
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-init.adoc 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-init.adoc
new file mode 100644
index 000000000000..f9523e00eaec
--- /dev/null
+++ 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-init.adoc
@@ -0,0 +1,28 @@
+
+// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
+= camel test init
+
+Creates a new Citrus test
+
+NOTE: This command is provided by the `test` plugin. Install it with `camel 
plugin add test`.
+
+
+== Usage
+
+[source,bash]
+----
+camel test init [options]
+----
+
+
+
+== Options
+
+[cols="2,5,1,2",options="header"]
+|===
+| Option | Description | Default | Type
+| `--directory` | Directory where the files will be created | . | String
+| `-h,--help` | Display this help and exit |  | boolean
+|===
+
+
diff --git 
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-inspect.adoc
 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-inspect.adoc
new file mode 100644
index 000000000000..7d5164974a1b
--- /dev/null
+++ 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-inspect.adoc
@@ -0,0 +1,27 @@
+
+// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
+= camel test inspect
+
+Inspect a Citrus test and its source code in order to provide detailed 
information such as used endpoints as well as required modules and dependencies.
+
+NOTE: This command is provided by the `test` plugin. Install it with `camel 
plugin add test`.
+
+
+== Usage
+
+[source,bash]
+----
+camel test inspect [options]
+----
+
+
+
+== Options
+
+[cols="2,5,1,2",options="header"]
+|===
+| Option | Description | Default | Type
+| `-h,--help` | Display this help and exit |  | boolean
+|===
+
+
diff --git 
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-ps.adoc 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-ps.adoc
new file mode 100644
index 000000000000..4926e04c6527
--- /dev/null
+++ 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-ps.adoc
@@ -0,0 +1,29 @@
+
+// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
+= camel test ps
+
+List running Citrus tests
+
+NOTE: This command is provided by the `test` plugin. Install it with `camel 
plugin add test`.
+
+
+== Usage
+
+[source,bash]
+----
+camel test ps [options]
+----
+
+
+
+== Options
+
+[cols="2,5,1,2",options="header"]
+|===
+| Option | Description | Default | Type
+| `--pid` | List only pid in the output |  | boolean
+| `--sort` | Sort by pid, name or age | pid | String
+| `-h,--help` | Display this help and exit |  | boolean
+|===
+
+
diff --git 
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-run.adoc 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-run.adoc
new file mode 100644
index 000000000000..2b910da3a1a6
--- /dev/null
+++ 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test-run.adoc
@@ -0,0 +1,41 @@
+
+// AUTO-GENERATED by camel-package-maven-plugin - DO NOT EDIT THIS FILE
+= camel test run
+
+Run as local Citrus test
+
+NOTE: This command is provided by the `test` plugin. Install it with `camel 
plugin add test`.
+
+
+== Usage
+
+[source,bash]
+----
+camel test run [options]
+----
+
+
+
+== Options
+
+[cols="2,5,1,2",options="header"]
+|===
+| Option | Description | Default | Type
+| `--dep,--dependency` | Comma delimited list of additional Maven GAV 
dependencies that must be loaded to run the test. |  | List
+| `--engine` | Name of the test engine that is used to run tests. One of 
junit, junit-jupiter, junit4, testng, cucumber |  | String
+| `--includes` | Includes test name pattern. |  | List
+| `--inspect-code` | When enabled the source code gets analyzed for required 
modules and dependencies that are added to the classpath. | true | boolean
+| `--logging` | Can be used to turn off logging | true | boolean
+| `--logging-color` | Use colored logging | true | boolean
+| `--logging-level` | Logging level | info | String
+| `--modules` | Comma delimited list of additional Citrus modules that must be 
loaded to run the test. |  | String
+| `--offline` | When enabled there will be no attempts to resolve Maven 
artifacts via internet connection. | false | boolean
+| `--property,--properties` | Default System property to set before the test 
run. |  | List
+| `--repository,--repositories` | Set of Maven repositories that should be 
used to resolve dependencies. |  | List
+| `--reset` | Should the test engine reset the suite state for this run. | 
true | String
+| `--verbose` | Should the test engine print verbose test summary information. 
| true | String
+| `--work-directory` | The working directory used by the file based test 
engines to load file resources from. |  | String
+| `-h,--help` | Display this help and exit |  | boolean
+|===
+
+
diff --git 
a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test.adoc 
b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test.adoc
index 419d816d47bc..e6b5fc64fbb0 100644
--- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test.adoc
+++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-test.adoc
@@ -15,4 +15,26 @@ camel test [options]
 ----
 
 
+== Subcommands
+
+[cols="2,5",options="header"]
+|===
+| Subcommand | Description
+| xref:jbang-commands/camel-jbang-test-agent.adoc[agent] | Manage Citrus agents
+| xref:jbang-commands/camel-jbang-test-init.adoc[init] | Creates a new Citrus 
test
+| xref:jbang-commands/camel-jbang-test-inspect.adoc[inspect] | Inspect a 
Citrus test and its source code in order to provide detailed information such 
as used endpoints as well as required modules and dependencies.
+| xref:jbang-commands/camel-jbang-test-ps.adoc[ps] | List running Citrus tests
+| xref:jbang-commands/camel-jbang-test-run.adoc[run] | Run as local Citrus test
+|===
+
+
+
+== Options
+
+[cols="2,5,1,2",options="header"]
+|===
+| Option | Description | Default | Type
+| `-h,--help` | Display this help and exit |  | boolean
+|===
+
 
diff --git a/dsl/camel-jbang/camel-jbang-it/pom.xml 
b/dsl/camel-jbang/camel-jbang-it/pom.xml
index 7ac1650dd2ee..b0d199282a6b 100644
--- a/dsl/camel-jbang/camel-jbang-it/pom.xml
+++ b/dsl/camel-jbang/camel-jbang-it/pom.xml
@@ -126,10 +126,6 @@
                     <groupId>commons-io</groupId>
                     <artifactId>commons-io</artifactId>
                 </exclusion>
-                <exclusion>
-                    <groupId>info.picocli</groupId>
-                    <artifactId>picocli</artifactId>
-                </exclusion>
                 <exclusion>
                     <groupId>com.github.freva</groupId>
                     <artifactId>ascii-table</artifactId>
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/generated/resources/META-INF/camel-jbang-plugin-commands-metadata.json
 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/generated/resources/META-INF/camel-jbang-plugin-commands-metadata.json
index 3be99fdf474f..b80c234a33b7 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/generated/resources/META-INF/camel-jbang-plugin-commands-metadata.json
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/generated/resources/META-INF/camel-jbang-plugin-commands-metadata.json
@@ -1,5 +1,5 @@
 {
   "commands": [
-    { "name": "test", "fullName": "test", "description": "Manage tests for 
Camel applications", "sourceClass": 
"org.apache.camel.dsl.jbang.core.commands.test.TestCommand", "plugin": "test" }
+    { "name": "test", "fullName": "test", "description": "Manage tests for 
Camel applications", "sourceClass": 
"org.apache.camel.dsl.jbang.core.commands.test.TestCommand", "plugin": "test", 
"options": [ { "names": "-h,--help", "description": "Display this help and 
exit", "javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name": 
"agent", "fullName": "test agent", "description": "Manage Citrus agents", 
"sourceClass": "org.apache.camel.dsl.jbang.core.commands.test.TestAgent", [...]
   ]
 }
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestAgent.java
 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestAgent.java
new file mode 100644
index 000000000000..e48a68fe8e7d
--- /dev/null
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestAgent.java
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+
+package org.apache.camel.dsl.jbang.core.commands.test;
+
+import java.util.List;
+
+import org.aesh.command.Command;
+import org.aesh.command.invocation.CommandInvocation;
+import org.citrusframework.jbang.cli.CitrusJBangMain;
+import org.citrusframework.jbang.cli.commands.Agent;
+import org.citrusframework.jbang.cli.commands.AgentRun;
+import org.citrusframework.jbang.cli.commands.AgentStop;
+
+/**
+ * Overrides the Citrus {@link Agent} group command so that the {@code start} 
subcommand dispatches to
+ * {@link TestAgentStart} instead of the plain Citrus {@code AgentStart}. The 
Citrus {@code Agent} implements
+ * {@code GroupCommand} and its {@code getCommands()} returns plain Citrus 
command instances, which aesh uses for
+ * dispatch — bypassing subcommands registered via the Camel {@code 
CommandTree}.
+ */
+public class TestAgent extends Agent {
+
+    public TestAgent(CitrusJBangMain main) {
+        super(main);
+    }
+
+    @Override
+    public List<Command<CommandInvocation>> getCommands() {
+        return List.of(
+                new TestAgentStart(getMain()),
+                new AgentRun(getMain()),
+                new AgentStop(getMain()));
+    }
+}
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestAgentStart.java
 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestAgentStart.java
new file mode 100644
index 000000000000..75bc553b515c
--- /dev/null
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestAgentStart.java
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+
+package org.apache.camel.dsl.jbang.core.commands.test;
+
+import org.aesh.command.CommandException;
+import org.aesh.command.CommandResult;
+import org.aesh.command.invocation.CommandInvocation;
+import org.apache.camel.dsl.jbang.run.common.RuntimeUtil;
+import org.citrusframework.jbang.cli.CitrusJBangMain;
+import org.citrusframework.jbang.cli.commands.AgentStart;
+
+/**
+ * Resolves citrus-agent artifacts into the plugin classloader before the 
Citrus agent start command runs. This avoids a
+ * classloader identity conflict in {@code 
ClassLoaderHelper.instantiateType()}: the Citrus {@code AgentStart} command
+ * dynamically resolves the citrus-agent module and wraps the TCCL in an 
{@code OpenURLClassLoader}. When the plugin
+ * runs inside Camel JBang, the {@code CitrusAgentConfiguration} class loaded 
by that wrapper can differ (by classloader
+ * identity) from the one on the plugin classloader, causing the constructor 
lookup to fail. Pre-loading the artifacts
+ * into the plugin classloader keeps everything on one classloader so the 
identity check passes.
+ */
+public class TestAgentStart extends AgentStart {
+
+    public TestAgentStart(CitrusJBangMain citrus) {
+        super(citrus);
+    }
+
+    @Override
+    public CommandResult execute(CommandInvocation invocation) throws 
CommandException, InterruptedException {
+        return TestPlugin.withClassLoader(inv -> {
+            try {
+                RuntimeUtil.configureLog("info", true, false, false, false, 
null, null);
+            } catch (Exception e) {
+                printer().printErr("Failed to configure logging for agent 
start command '%s': %s"
+                        .formatted(e.getClass(), e.getMessage()));
+            }
+            return super.execute(inv);
+        }, invocation);
+    }
+}
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestCommand.java
 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestCommand.java
index 95ff369b974c..d0df54043498 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestCommand.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestCommand.java
@@ -16,32 +16,19 @@
  */
 package org.apache.camel.dsl.jbang.core.commands.test;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.aesh.command.CommandDefinition;
-import org.aesh.command.option.Arguments;
 import org.apache.camel.dsl.jbang.core.commands.CamelCommand;
 import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
 
-/**
- * The test commands of Citrus. Citrus 5.1 defines its commands with picocli, 
so aesh does not parse this command line:
- * picocli parses and runs it with the commands of Citrus (see {@link 
TestPlugin#citrus(CamelJBangMain)}), until Citrus
- * is on aesh too.
- */
-@CommandDefinition(name = "test", description = "Manage tests for Camel 
applications (use test --help to see sub commands)",
-                   disableParsing = true)
+@CommandDefinition(name = "test", description = "Manage tests for Camel 
applications", generateHelp = true)
 public class TestCommand extends CamelCommand {
 
-    @Arguments
-    List<String> args = new ArrayList<>();
-
     public TestCommand(CamelJBangMain main) {
         super(main);
     }
 
     @Override
     public Integer doCall() throws Exception {
-        return 
TestPlugin.citrus(getMain()).execute(args.toArray(String[]::new));
+        return printHelp();
     }
 }
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestInit.java
 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestInit.java
index afba569be356..cea8a4e2779e 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestInit.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestInit.java
@@ -19,70 +19,92 @@ package org.apache.camel.dsl.jbang.core.commands.test;
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
-import java.lang.reflect.Field;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 
+import org.aesh.command.CommandResult;
+import org.aesh.command.impl.internal.OptionType;
+import org.aesh.command.impl.internal.ProcessedCommand;
+import org.aesh.command.impl.internal.ProcessedOptionBuilder;
+import org.aesh.command.invocation.CommandInvocation;
 import org.apache.camel.catalog.VersionHelper;
+import org.apache.camel.dsl.jbang.core.common.CommandTree;
 import org.apache.camel.dsl.jbang.run.common.ExportHelper;
 import org.apache.camel.util.IOHelper;
 import org.citrusframework.CitrusSettings;
 import org.citrusframework.CitrusVersion;
 import org.citrusframework.jbang.cli.CitrusJBangMain;
 import org.citrusframework.jbang.cli.commands.Init;
-import picocli.CommandLine;
 
 /**
  * Automatically uses test subfolder as a working directory for creating new 
tests. Automatically adds a
  * citrus-application.properties configuration if not present.
+ *
+ * The --force option is added programmatically in {@link 
#setProcessedCommand} because Citrus ships compile-time
+ * generated aesh metadata ({@code Init_AeshMetadata}) that takes precedence 
over annotation scanning. That metadata
+ * only knows about {@code Init}'s own fields, so a subclass {@code @Option} 
would be silently ignored.
  */
[email protected](name = "init", description = "Creates a new Citrus test")
-public class TestInit extends Init {
+public class TestInit extends Init implements CommandTree.ParsedCommandAware {
 
-    @CommandLine.Option(names = { "--force" }, description = "Overwrite a test 
that exists already", defaultValue = "false")
     boolean force;
 
-    @CommandLine.Spec
-    CommandLine.Model.CommandSpec spec;
-
     public TestInit(CitrusJBangMain citrus) {
         super(citrus);
     }
 
     @Override
-    public Integer call() throws Exception {
-        // the Citrus init writes the test over one that exists, so an edited 
test was lost (CAMEL-26933)
-        Path target = targetFile();
-        System.err.println("DEBUG26933 spec=" + (spec != null) + " target=" + 
target + " pos="
-                           + (spec != null ? spec.positionalParameters() : 
null));
-        if (target != null && Files.exists(target) && !force) {
-            printer().println("Error: Test already exists: %s (use --force to 
overwrite it)".formatted(target));
-            return 1;
+    public void setProcessedCommand(ProcessedCommand<?, ?> processedCommand, 
CommandTree tree) {
+        try {
+            processedCommand.addOption(
+                    ProcessedOptionBuilder.builder()
+                            .name("force")
+                            .description("Overwrite a test that exists 
already")
+                            .hasValue(false)
+                            .type(Boolean.class)
+                            .optionType(OptionType.BOOLEAN)
+                            .fieldSetter((cmd, val) -> ((TestInit) cmd).force 
= val != null && (Boolean) val)
+                            .fieldGetter(cmd -> ((TestInit) cmd).force)
+                            .fieldResetter(cmd -> ((TestInit) cmd).force = 
false)
+                            .build());
+        } catch (Exception e) {
+            throw new RuntimeException("Failed to add --force option to test 
init command", e);
         }
-        return super.call();
+    }
+
+    @Override
+    public CommandResult execute(CommandInvocation invocation)
+            throws org.aesh.command.CommandException, InterruptedException {
+        return TestPlugin.withClassLoader(inv -> {
+            try {
+                Path target = targetFile();
+                if (target != null && Files.exists(target) && !force) {
+                    printer().println("Error: Test already exists: %s (use 
--force to overwrite it)".formatted(target));
+                    return CommandResult.FAILURE;
+                }
+                return super.execute(inv);
+            } catch (Exception e) {
+                printer().println(
+                        "Error: Failed to initialize test: %s 
%s".formatted(e.getClass().getName(), e.getMessage()));
+                return CommandResult.FAILURE;
+            }
+        }, invocation);
     }
 
     /**
      * The file the Citrus init writes: the file argument in the target 
directory, or null when it is not known.
      */
     Path targetFile() {
-        // the file argument goes through a parameter consumer of Citrus into 
its private field file
-        String file;
         try {
-            Field field = Init.class.getDeclaredField("file");
-            field.setAccessible(true);
-            file = (String) field.get(this);
+            String file = TestPlugin.readField(Init.class, "file", this);
+            if (file == null) {
+                return null;
+            }
+            String directory = TestPlugin.readField(Init.class, "directory", 
this);
+            return Path.of(resolveTargetDirectory(directory)).resolve(file);
         } catch (ReflectiveOperationException | RuntimeException e) {
-            // another Citrus version: no check, as before
-            return null;
-        }
-        if (file == null) {
             return null;
         }
-        CommandLine.Model.OptionSpec option = spec != null ? 
spec.findOption("--directory") : null;
-        String directory = option != null ? option.getValue() : null;
-        return Path.of(resolveTargetDirectory(directory)).resolve(file);
     }
 
     @Override
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestInspect.java
 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestInspect.java
new file mode 100644
index 000000000000..d66415277924
--- /dev/null
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestInspect.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.
+ */
+
+package org.apache.camel.dsl.jbang.core.commands.test;
+
+import org.aesh.command.CommandException;
+import org.aesh.command.CommandResult;
+import org.aesh.command.invocation.CommandInvocation;
+import org.citrusframework.jbang.cli.CitrusJBangMain;
+import org.citrusframework.jbang.cli.commands.Inspect;
+
+/**
+ * Adjusts the thread context class loader for the duration of the Citrus 
inspect command so that Citrus can resolve its
+ * resources.
+ */
+public class TestInspect extends Inspect {
+
+    public TestInspect(CitrusJBangMain citrus) {
+        super(citrus);
+    }
+
+    @Override
+    public CommandResult execute(CommandInvocation invocation) throws 
CommandException, InterruptedException {
+        return TestPlugin.withClassLoader(super::execute, invocation);
+    }
+}
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestPlugin.java
 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestPlugin.java
index 64885e868cb0..3f85e3ede814 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestPlugin.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestPlugin.java
@@ -16,27 +16,21 @@
  */
 package org.apache.camel.dsl.jbang.core.commands.test;
 
+import java.lang.reflect.Field;
 import java.util.Optional;
-import java.util.concurrent.Callable;
 
-import org.apache.camel.catalog.VersionHelper;
+import org.aesh.command.CommandResult;
+import org.aesh.command.invocation.CommandInvocation;
 import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
 import org.apache.camel.dsl.jbang.core.common.CamelJBangPlugin;
 import org.apache.camel.dsl.jbang.core.common.CommandTree;
 import org.apache.camel.dsl.jbang.core.common.Plugin;
 import org.apache.camel.dsl.jbang.run.common.PluginExporter;
 import org.apache.camel.dsl.jbang.run.common.Printer;
-import org.citrusframework.CitrusVersion;
 import org.citrusframework.jbang.cli.CitrusJBangMain;
-import org.citrusframework.jbang.cli.commands.Agent;
 import org.citrusframework.jbang.cli.commands.AgentRun;
-import org.citrusframework.jbang.cli.commands.AgentStart;
 import org.citrusframework.jbang.cli.commands.AgentStop;
-import org.citrusframework.jbang.cli.commands.CitrusCommand;
-import org.citrusframework.jbang.cli.commands.Inspect;
 import org.citrusframework.jbang.cli.commands.ListTests;
-import org.citrusframework.jbang.cli.commands.Run;
-import picocli.CommandLine;
 
 @CamelJBangPlugin(name = "camel-jbang-plugin-test", firstVersion = "4.14.0", 
appliesTo = { "export" })
 public class TestPlugin implements Plugin {
@@ -45,43 +39,18 @@ public class TestPlugin implements Plugin {
 
     @Override
     public void customize(CommandTree commandLine, CamelJBangMain main) {
-        commandLine.addSubcommand("test", new CommandTree(new 
TestCommand(main)));
-    }
-
-    /**
-     * The test commands of Citrus, which Citrus 5.1 defines with picocli: 
picocli parses and runs the command line of
-     * camel test.
-     */
-    static CommandLine citrus(CamelJBangMain main) {
         CitrusJBangMain citrus = new CitrusJBangMain();
         citrus.withPrinter(new PipedPrinter(main.getOut()));
 
-        return new CommandLine(new CitrusTests())
-                .addSubcommand("init", new CommandLine(new TestInit(citrus)))
-                .addSubcommand("inspect", new CommandLine(new Inspect(citrus)))
-                .addSubcommand("run", new CommandLine(new Run(citrus)))
-                .addSubcommand("ps", new CommandLine(new ListTests(citrus)), 
"ls")
-                .addSubcommand("agent", new CommandLine(new Agent(citrus))
-                        .addSubcommand("start", new CommandLine(new 
AgentStart(citrus)))
-                        .addSubcommand("run", new CommandLine(new 
AgentRun(citrus)))
-                        .addSubcommand("stop", new CommandLine(new 
AgentStop(citrus))))
-                .setExecutionStrategy(new CitrusExecutionStrategy(main));
-    }
-
-    @CommandLine.Command(name = "camel test",
-                         description = "Manage tests for Camel applications 
(use test --help to see sub commands)",
-                         mixinStandardHelpOptions = true)
-    static class CitrusTests implements Callable<Integer> {
-
-        @CommandLine.Spec
-        CommandLine.Model.CommandSpec spec;
-
-        @Override
-        public Integer call() {
-            // defaults to printing the help message
-            spec.commandLine().usage(System.out);
-            return 0;
-        }
+        commandLine.addSubcommand("test", new CommandTree(new 
TestCommand(main))
+                .addSubcommand("init", new CommandTree(new TestInit(citrus)))
+                .addSubcommand("inspect", new CommandTree(new 
TestInspect(citrus)))
+                .addSubcommand("run", new CommandTree(new TestRun(citrus)))
+                .addSubcommand("ps", new CommandTree(new ListTests(citrus)), 
"ls")
+                .addSubcommand("agent", new CommandTree(new TestAgent(citrus))
+                        .addSubcommand("start", new CommandTree(new 
TestAgentStart(citrus)))
+                        .addSubcommand("run", new CommandTree(new 
AgentRun(citrus)))
+                        .addSubcommand("stop", new CommandTree(new 
AgentStop(citrus)))));
     }
 
     @Override
@@ -89,63 +58,40 @@ public class TestPlugin implements Plugin {
         return Optional.of(new TestPluginExporter());
     }
 
+    static boolean isCamelLauncherRuntime() {
+        return Boolean.parseBoolean(System.getProperty("camel.launcher", 
"false"));
+    }
+
     /**
-     * Command execution strategy performs special command preparations and 
makes sure to set and run the proper Citrus
-     * version for this Camel release.
+     * Executes a Citrus command with the plugin class loader set as the 
thread context class loader, restoring the
+     * original class loader afterward. In the Camel Launcher runtime the 
class loader is already correct.
      */
-    private record CitrusExecutionStrategy(CamelJBangMain main) implements 
CommandLine.IExecutionStrategy {
-
-        @Override
-        public int execute(CommandLine.ParseResult parseResult)
-                throws CommandLine.ExecutionException, 
CommandLine.ParameterException {
-
-            if (!parseResult.errors().isEmpty() || 
!parseResult.unmatched().isEmpty()) {
-                // Something is wrong with the command - do not adjust anything
-                return new CommandLine.RunLast().execute(parseResult);
+    static CommandResult withClassLoader(
+            CitrusCommandAction action, CommandInvocation invocation)
+            throws org.aesh.command.CommandException, InterruptedException {
+        if (!isCamelLauncherRuntime()) {
+            ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+            try {
+                
Thread.currentThread().setContextClassLoader(TestPlugin.class.getClassLoader());
+                return action.execute(invocation);
+            } finally {
+                Thread.currentThread().setContextClassLoader(tccl);
             }
-
-            if (isCitrusCommand(parseResult)) {
-                System.setProperty("citrus.jbang.version", 
CitrusVersion.version());
-                System.setProperty("citrus.camel.jbang.version", new 
VersionHelper().getVersion());
-
-                if (!isCamelLauncherRuntime()) {
-                    var tccLoader = 
Thread.currentThread().getContextClassLoader();
-                    try {
-                        // Update class loader so Citrus is able to resolve 
resources
-                        ClassLoader cl = TestPlugin.class.getClassLoader();
-                        Thread.currentThread().setContextClassLoader(cl);
-
-                        return new CommandLine.RunLast().execute(parseResult);
-                    } finally {
-                        
Thread.currentThread().setContextClassLoader(tccLoader);
-                    }
-                }
-            }
-
-            return new CommandLine.RunLast().execute(parseResult);
-        }
-
-        /**
-         * Evaluate if the current runtime is using Camel Launcher. Camel 
launcher sets a System property marking the
-         * runtime nature. If the System property is not present we can assume 
that the runtime is something different
-         * e.g. Camel JBang.
-         */
-        private boolean isCamelLauncherRuntime() {
-            return Boolean.parseBoolean(System.getProperty("camel.launcher", 
"false"));
         }
+        return action.execute(invocation);
+    }
 
-        /**
-         * Evaluate command user object and check if this is a Citrus command 
implementation.
-         */
-        private boolean isCitrusCommand(CommandLine.ParseResult parseResult) {
-            CommandLine.ParseResult subcommand = parseResult;
-            while (subcommand.hasSubcommand()) {
-                subcommand = subcommand.subcommand();
-            }
+    @SuppressWarnings("unchecked")
+    static <T> T readField(Class<?> clazz, String name, Object instance) 
throws ReflectiveOperationException {
+        Field field = clazz.getDeclaredField(name);
+        field.setAccessible(true);
+        return (T) field.get(instance);
+    }
 
-            Object commandObject = subcommand.commandSpec().userObject();
-            return commandObject instanceof CitrusCommand;
-        }
+    @FunctionalInterface
+    interface CitrusCommandAction {
+        CommandResult execute(CommandInvocation invocation)
+                throws org.aesh.command.CommandException, InterruptedException;
     }
 
     /**
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestRun.java
 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestRun.java
new file mode 100644
index 000000000000..09596812c505
--- /dev/null
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/main/java/org/apache/camel/dsl/jbang/core/commands/test/TestRun.java
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ */
+
+package org.apache.camel.dsl.jbang.core.commands.test;
+
+import org.aesh.command.CommandException;
+import org.aesh.command.CommandResult;
+import org.aesh.command.invocation.CommandInvocation;
+import org.apache.camel.catalog.VersionHelper;
+import org.apache.camel.dsl.jbang.run.common.RuntimeUtil;
+import org.citrusframework.CitrusVersion;
+import org.citrusframework.jbang.cli.CitrusJBangMain;
+import org.citrusframework.jbang.cli.commands.Run;
+
+/**
+ * Sets the Camel JBang version and adjusts the thread context class loader 
for the duration of the Citrus test run so
+ * that Citrus can resolve its resources.
+ */
+public class TestRun extends Run {
+
+    public TestRun(CitrusJBangMain citrus) {
+        super(citrus);
+    }
+
+    @Override
+    public CommandResult execute(CommandInvocation invocation) throws 
CommandException, InterruptedException {
+        System.setProperty("citrus.jbang.version", CitrusVersion.version());
+        System.setProperty("citrus.camel.jbang.version", new 
VersionHelper().getVersion());
+
+        return TestPlugin.withClassLoader(inv -> {
+            configureLogging();
+            return super.execute(inv);
+        }, invocation);
+    }
+
+    /**
+     * Reconfigure the existing Log4j2 context so that Citrus SLF4J log output 
appears on the console. Citrus's
+     * LoggingSupport creates a separate named context that the SLF4J loggers 
do not use.
+     */
+    private void configureLogging() {
+        try {
+            boolean logging = TestPlugin.readField(Run.class, "logging", this);
+            boolean loggingColor = TestPlugin.readField(Run.class, 
"loggingColor", this);
+            String loggingLevel = TestPlugin.readField(Run.class, 
"loggingLevel", this);
+
+            if (logging) {
+                RuntimeUtil.configureLog(loggingLevel, loggingColor, false, 
false, false, null, null);
+            } else {
+                RuntimeUtil.configureLog("off", false, false, false, false, 
null, null);
+            }
+        } catch (Exception e) {
+            printer().printErr("Failed to configure logging for run command 
'%s': %s"
+                    .formatted(e.getClass(), e.getMessage()));
+        }
+    }
+}
diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/test/java/org/apache/camel/dsl/jbang/core/commands/test/TestPluginTest.java
 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/test/java/org/apache/camel/dsl/jbang/core/commands/test/TestPluginTest.java
index 7321e17e17be..4f82fc55bd3c 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-test/src/test/java/org/apache/camel/dsl/jbang/core/commands/test/TestPluginTest.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-test/src/test/java/org/apache/camel/dsl/jbang/core/commands/test/TestPluginTest.java
@@ -29,6 +29,7 @@ import org.apache.camel.dsl.jbang.run.common.Printer;
 import org.apache.camel.dsl.jbang.run.common.RuntimeType;
 import org.apache.camel.dsl.jbang.run.common.StringPrinter;
 import org.apache.camel.dsl.jbang.run.common.VersionHelper;
+import org.citrusframework.jbang.cli.CitrusJBangMain;
 import org.citrusframework.spi.Resources;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.BeforeEach;
@@ -378,6 +379,46 @@ class TestPluginTest {
         }
     }
 
+    @Test
+    public void shouldUseTestAgentInCommandTree() {
+        CamelJBangMain main = createCamelJBangMain();
+        CommandTree root = new CommandTree(main);
+        TestPlugin plugin = new TestPlugin();
+        plugin.customize(root, main);
+
+        CommandTree agentTree = root.getSubcommands().get("test")
+                .getSubcommands().get("agent");
+        Assertions.assertNotNull(agentTree, "test agent command should be 
registered");
+        Assertions.assertInstanceOf(TestAgent.class, agentTree.getCommand(),
+                "agent command should be TestAgent, not the plain Citrus 
Agent");
+    }
+
+    @Test
+    public void shouldUseTestAgentStartInCommandTree() {
+        CamelJBangMain main = createCamelJBangMain();
+        CommandTree root = new CommandTree(main);
+        TestPlugin plugin = new TestPlugin();
+        plugin.customize(root, main);
+
+        CommandTree startTree = root.getSubcommands().get("test")
+                .getSubcommands().get("agent")
+                .getSubcommands().get("start");
+        Assertions.assertNotNull(startTree, "test agent start command should 
be registered");
+        Assertions.assertInstanceOf(TestAgentStart.class, 
startTree.getCommand(),
+                "agent start command should be TestAgentStart, not the plain 
Citrus AgentStart");
+    }
+
+    @Test
+    public void testAgentGetCommandsShouldReturnTestAgentStart() {
+        CitrusJBangMain citrus = new CitrusJBangMain();
+        TestAgent agent = new TestAgent(citrus);
+
+        boolean hasTestAgentStart = agent.getCommands().stream()
+                .anyMatch(cmd -> cmd instanceof TestAgentStart);
+        Assertions.assertTrue(hasTestAgentStart,
+                "TestAgent.getCommands() must return TestAgentStart so aesh 
dispatches to it");
+    }
+
     /**
      * Creates CamelJBangMain instance ready for unit testing. Automatically 
adds test plugin commands. Automatically
      * sets the out printer.
diff --git a/parent/pom.xml b/parent/pom.xml
index 23f054b70cb1..b42c0b170478 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -119,7 +119,7 @@
         <clickhouse-client-version>0.11.0</clickhouse-client-version>
         <jta-api-1.2-version>1.2</jta-api-1.2-version>
         <chunk-templates-version>3.6.2</chunk-templates-version>
-        <citrus-version>5.1.0</citrus-version>
+        <citrus-version>5.2.0</citrus-version>
         <classgraph-version>4.8.199</classgraph-version>
         <cloudant-version>0.10.22</cloudant-version>
         
<com-ibm-mq-jakarta-client-version>10.0.1.0</com-ibm-mq-jakarta-client-version>

Reply via email to