Hi everyone, I ran into a problem when setting up a test configuration of a project that uses Endpoint DSL to inject two different S3Client beans into a route in a type-safe manner. When using Advice with to mock an unrelated part of the route, Camel suddenly seemed to ignore my pre-configured S3Clients and tried (unsuccessfully) to instantiate a default client.
After some digging, I found that modelToXMLDumper.dumpModelAsXml(camelContext, definition) forces the EndpointBuilder to become a URI String that seems to be missing a proper reference to the bean we need to use. If I set the optional logXml parameter of adviceWith() to false, the Advice works as expected. I see two issues here: 1. Coercing an EndpointBuilder to a URI String generates a "hash=12345678" parameter that apparently doesn't encode the bean correctly 2. The RouteDefinition GETS MUTATED BY A LOGGING STATEMENT Test case here: https://github.com/bridgerdier/camel-advicewith-endpointdsl/ Cheers, Valetnin Brückel [cid:fd955678-179d-4e60-94d2-4f914486ccf2] predic8 GmbH Koblenzer Str. 65 53173 Bonn predic8.de<https://www.predic8.de/> Tel: +4<https://predic8-wiki.atlassian.net/wiki/spaces/inet/pages/372670466/Outlook#>9 (0) 228 5552576-0 Fax: +49 (0) 228 5552576-50 Amtsgericht Bonn HRB 16152 Geschäftsführer: Thomas Bayer, Tobias Polley
