It seems that you have an error in FakeRoutingApi.Defer method.
The current code:
var messageSentToDestination = _factory.CreateEventGeneric(
typeof(MessageSentToDestination<>),
explicitlyRoutedMessage.GetType(),
destinationAddress,
delay,
explicitlyRoutedMessage,
optionalHeaders
);
There should be typeof(MessageDeferredToDestination<>) instead of typeof(MessageSentToDestination<>).
Hi
It seems that you have an error in FakeRoutingApi.Defer method. The current code: var messageSentToDestination = _factory.CreateEventGeneric(
typeof(MessageSentToDestination<>),
explicitlyRoutedMessage.GetType(),
destinationAddress,
delay,
explicitlyRoutedMessage,
optionalHeaders
);
There should be typeof(MessageDeferredToDestination<>) instead of typeof(MessageSentToDestination<>).