February 2015
Intermediate to advanced
198 pages
4h 17m
English
Spring Integration provides a class that can help to build certain payloads such as the following example:
Message<String> message = MessageBuilder.withPayload("Test").build()These messages can be put on the channel by grabbing the handle of an actual channel definition. This can be used for negative as well as positive testing. For example, if a service activator listening on the channel expects a message with the payload type File, then putting a message with a payload String should indicate an error. Let's write a quick test for our transformer, which accepts Message with the payload SyndEntry and converts it to SoFeed. The following code snippet is our transformer class:
import org.springframework.messaging.Message; import com.cpandey.siexample.pojo.SoFeed; ...
Read now
Unlock full access