@Test void convertAndSend_WithDestinationNameAndPayload_shouldResolveTheDestinationAndSendTheConvertedMessage() throws Exception { MessageSendingTemplateTest messageSendingTemplate = new MessageSendingTemplateTest( this.destinationResolver); when(this.destinationResolver.resolveDestination("destination")) .thenReturn("resolvedDestination"); String payload = "payload"; messageSendingTemplate.convertAndSend("destination", payload); verify(this.destinationResolver).resolveDestination("destination"); assertThat( messageSendingTemplate.getMessageChannel().getSentMessage().getPayload()) .isEqualTo(payload); }
@Override public <T> void convertAndSend(String destinationName, T payload) throws MessagingException { D channel = resolveMessageChannelByLogicalName(destinationName); convertAndSend(channel, payload); }
AbstractMessageChannelMessagingSendingTemplate extends AbstractMessageSendingTemplate<D> implements DestinationResolvingMessageSendingOperations<D> { @Override public <T> void convertAndSend(String destinationName, T payload) throws MessagingException { D channel = resolveMessageChannelByLogicalName(destinationName); convertAndSend(channel, payload); } }
AbstractMessageChannelMessagingSendingTemplate extends AbstractMessageSendingTemplate<D> implements DestinationResolvingMessageSendingOperations<D> { @Override public <T> void convertAndSend(String destinationName, T payload) throws MessagingException { D channel = resolveMessageChannelByLogicalName(destinationName); convertAndSend(channel, payload); } protected  AbstractMessageChannelMessagingSendingTemplate(
			DestinationResolver<String> destinationResolver); }
AbstractMessageChannelMessagingSendingTemplate extends AbstractMessageSendingTemplate<D> implements DestinationResolvingMessageSendingOperations<D> { @Override public <T> void convertAndSend(String destinationName, T payload) throws MessagingException { D channel = resolveMessageChannelByLogicalName(destinationName); convertAndSend(channel, payload); } protected  AbstractMessageChannelMessagingSendingTemplate(
			DestinationResolver<String> destinationResolver); void setDefaultDestinationName(String defaultDestination); @Override void send(String destinationName, Message<?> message); @Override void convertAndSend(String destinationName, T payload); @Override void convertAndSend(String destinationName, T payload,
			Map<String, Object> headers); @Override void convertAndSend(String destinationName, T payload,
			MessagePostProcessor postProcessor); @Override void convertAndSend(String destinationName, T payload,
			Map<String, Object> headers, MessagePostProcessor postProcessor); }
AbstractMessageChannelMessagingSendingTemplate extends AbstractMessageSendingTemplate<D> implements DestinationResolvingMessageSendingOperations<D> { @Override public <T> void convertAndSend(String destinationName, T payload) throws MessagingException { D channel = resolveMessageChannelByLogicalName(destinationName); convertAndSend(channel, payload); } protected  AbstractMessageChannelMessagingSendingTemplate(
			DestinationResolver<String> destinationResolver); void setDefaultDestinationName(String defaultDestination); @Override void send(String destinationName, Message<?> message); @Override void convertAndSend(String destinationName, T payload); @Override void convertAndSend(String destinationName, T payload,
			Map<String, Object> headers); @Override void convertAndSend(String destinationName, T payload,
			MessagePostProcessor postProcessor); @Override void convertAndSend(String destinationName, T payload,
			Map<String, Object> headers, MessagePostProcessor postProcessor);  }