use of org.springframework.integration.transformer.support.RoutingSlipHeaderValueMessageProcessor in project spring-integration by spring-projects.
the class RoutingSlipTests method testInvalidRoutingSlipRoutStrategy.
@Test
public void testInvalidRoutingSlipRoutStrategy() {
try {
new RoutingSlipHeaderValueMessageProcessor(new Date());
fail("IllegalArgumentException expected");
} catch (Exception e) {
assertThat(e, instanceOf(IllegalArgumentException.class));
assertThat(e.getMessage(), containsString("The RoutingSlip can contain " + "only bean names of MessageChannel or RoutingSlipRouteStrategy, " + "or MessageChannel and RoutingSlipRouteStrategy instances"));
}
try {
this.invalidRoutingSlipChannel.send(new GenericMessage<>("foo"));
fail("MessagingException expected");
} catch (Exception e) {
assertThat(e, instanceOf(MessagingException.class));
assertThat(e.getMessage(), containsString("replyChannel must be a MessageChannel or String"));
}
}
Aggregations