git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:
                     .convertBodyTo(MyCustomClass.class)
                     .to("mock:simpleMeasureConverted")

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: christian.jacob@xxxxxxxxxx

----------------------------------------------------------------
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