List of usage examples for org.springframework.messaging Message Message
Message
From source file:org.encuestame.core.test.integration.GatewayTestCase.java
@Test @Repeat(2)/*from www.j ava2 s . co m*/ public void testTransformation() { Assert.assertNotNull(this.twitterAdapter); this.twitterChannel.send(new Message<String>() { public MessageHeaders getHeaders() { return new MessageHeaders(new HashMap<String, Object>()); } public String getPayload() { return "original www.xebia.com message http://www.xebia.com " + RandomStringUtils.randomAlphabetic(3); } }); log.debug(errorChannel.getQueueSize()); this.twitterAdapter .publishTweet("text http://blog.jotadeveloper.com " + RandomStringUtils.randomAlphabetic(3)); }
From source file:org.encuestame.core.test.integration.IntegrationTestCase.java
@Test public void testTransformation() throws Exception { transformerInputChannel.send(new Message<String>() { public MessageHeaders getHeaders() { return new MessageHeaders(new HashMap<String, Object>()); }/* w w w . j a v a 2 s . co m*/ public String getPayload() { return "original www.xebia.com message http://www.xebia.com"; } }); Message<?> transformedMessage = transformerOutputChannel.receive(); log.debug("trams" + transformedMessage.getPayload()); assertNotNull(transformedMessage); assertNotSame((String) transformedMessage.getPayload(), ("original www.xebia.com message http://www.xebia.com")); log.debug("tinyurl.com"); }
From source file:org.encuestame.core.test.integration.IntegrationTestCase.java
@Test public void testTweetLongUrl() throws Exception { bites.send(new Message<String>() { public MessageHeaders getHeaders() { return new MessageHeaders(new HashMap<String, Object>()); }/*from www . j a v a 2 s .co m*/ public String getPayload() { return "Url Message :" + dateFormat.format(Calendar.getInstance().getTime()) + " http://www.google.es" + " url "; } }); }