AW: invoke mock after convertBodyTo

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

AW: invoke mock after convertBodyTo
Hi there,

in the meantime I found the reason for the error: my converter had thrown an exception, and that did not show up.

Kind regards,
Christian Jacob

Von: Jacob, Christian
Gesendet: Mittwoch, 17. Oktober 2018 10:04
An: [hidden email]
Betreff: invoke mock after convertBodyTo

Hi there,

I have a problem with invoking a mock after using a custom converter. In my test class, I've injected the MockEndpoint this way:
     @EndpointInject(uri = "mock:simpleMeasureConverted")
     private MockEndpoint mockSimpleMeasureConverted;

and in my route, it is invoked this way:

When I configure the mock endpoint to expect one message, this fails, because there are 0 messages arriving at the mock endpoint.

However, if I switched the two lines of my route, the mock endpoint is invoked. But then I can not check the result of the convertBodyTo-invocation. How can the mock be invoked?

Kind regards,
Christian Jacob

Innogy SE
Retail IT
Integration and Digital Solutions (AFS-IGI)
Rellinghauser Str. 37
45128 Essen
T intern: 70-20581
T extern: +49 (0)201 12 20582
T mobil: +49 (0)1622843981
Fax: +49 (0)201 12 24796
mailto: [hidden email]

innogy SE
Vorsitzender des Aufsichtsrates: Dr. Erhard Schipporeit
Vorstand: Uwe Tigges (Vorsitzender), Dr. Hans Buenting,
Dr. Bernhard Guenther, Arno Hahn, Martin Herrmann, Hildegard Mueller
Sitz der Gesellschaft: Essen, Eingetragen beim Amtsgericht Essen,
Handelsregister-Nr. HRB 27091, USt-IdNr. DE304171711