CAMEL-23688: camel-jbang - Tests for the runtime tools of camel ask (#27982)

Tests for the runtime tools of ToolRegistry (48% covered), which camel ask
and the MCP servers give an AI, against an integration that answers their
actions (FakeIntegration, shared with the eval tests): what each tool asks
the integration for (the source, dump, structure, topology, tracing,
browse, spans, heap dump, SQL, route control, messages), the sections of
the status, the circuit breakers, the errors and history, and the
analysis tools. They found these bugs, fixed here:

* send_message (camel ask) and tui_send_message (camel tui --mcp) put
  the headers, given as key=value lines as their description says, in
  the action as one text; the send action of the CLI connector reads a
  list of keys and values, so the message failed. RuntimeHelper sends the
  list now, and a line that is not key=value is an error of the tool.
* get_circuit_breakers left out the calls of the fallback, the calls
  that timed out and the calls a full bulkhead rejected, which camel get
  circuit-breaker shows.
* get_route_analysis, get_eip_stats and detect_config_drift put the
  answers of the integration in their answer as JSON text (escaped),
  instead of as JSON.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
6 files changed
tree: a2ad16874924e6e5eb6fcc12204bc059e0777b37
  1. .claude-plugin/
  2. .github/
  3. .idea/
  4. .mvn/
  5. .oss-ai-helper-rules/
  6. apache-camel/
  7. archetypes/
  8. bom/
  9. buildingtools/
  10. camel-dependencies/
  11. camel-sbom/
  12. catalog/
  13. components/
  14. core/
  15. coverage/
  16. design/
  17. docs/
  18. dsl/
  19. etc/
  20. parent/
  21. plugins/
  22. test-infra/
  23. tests/
  24. tooling/
  25. .asf.yaml
  26. .gitattributes
  27. .gitignore
  28. .gitmodules
  29. .sdkmanrc
  30. AGENTS.md
  31. CONTRIBUTING.md
  32. doap.rdf
  33. jbang-catalog.json
  34. Jenkinsfile
  35. Jenkinsfile.deploy
  36. Jenkinsfile.jbangtest
  37. Jenkinsfile.jdk26
  38. Jenkinsfile.jdk27
  39. KEYS
  40. LICENSE.txt
  41. mvnw
  42. mvnw.cmd
  43. NOTICE.txt
  44. pom.xml
  45. README.md
  46. SECURITY.md
README.md

Apache Camel

Maven Central Javadocs Stack Overflow Chat Twitter

Apache Camel is an open source integration framework with 350+ connectors for databases, APIs, message brokers, and cloud services. Write routes in Java, YAML, or XML. Run on Spring Boot, Quarkus, or standalone with the Camel CLI. In production since 2007 — used by thousands of companies worldwide. Apache License 2.0.

What is Apache Camel? | Getting Started | Components | Tooling | Docs for AI agents (llms.txt)

Get started in seconds

camel init hello.yaml
camel run hello.yaml

Or add to your existing Spring Boot project:

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-spring-boot-starter</artifactId>
</dependency>

Write it your way

The same route in YAML, Java, or XML — pick what fits your team:

YAML:

- route:
    from:
      uri: kafka:incoming-orders
      steps:
        - unmarshal:
            json: {}
        - to:
            uri: sql:INSERT INTO orders(id, data) VALUES(:#${header.id}, :#${body})

Java:

from("kafka:incoming-orders")
    .unmarshal().json()
    .to("sql:INSERT INTO orders(id, data) VALUES(:#${header.id}, :#${body})");

Runtimes

RuntimeWhat it does
Camel Spring BootCamel on Spring Boot with starters for 350+ connectors
Camel QuarkusCloud-native Camel with fast startup, low memory, native compilation
Camel CLIRun, develop, test, and trace routes from the command line

Other runtimes: Camel K (Kubernetes), Camel Karaf (OSGi), Camel Kafka Connector (Kafka Connect)

Components

350+ connectors for connecting to anything — Kafka, REST, JDBC, AWS, Azure, GCP, Salesforce, and more:

AI integration

Apache Camel provides an MCP server (Model Context Protocol) for AI coding assistants — Claude Code, GitHub Copilot, Cursor, and Gemini CLI get full Camel catalog context. Camel also includes components for LangChain4j and OpenAI, and supports the A2A agent-to-agent protocol for connecting AI agents to enterprise systems.

AI coding assistants can read the documentation as Markdown: llms.txt indexes it, and documentation pages are also available as Markdown by replacing .html with .md in the URL. Projects made by camel export and the Camel Maven archetypes include an AGENTS.md that points there.

Visual designers

  • Kaoto — open source visual designer for Camel routes, drag-and-drop, no code required
  • Karavan — visual designer for Camel integrations in VS Code and standalone

Examples

Contributing

We welcome all kinds of contributions:

https://github.com/apache/camel/blob/main/CONTRIBUTING.md

Community

Licensing

Apache License 2.0 — see LICENSE.txt.