351.4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351.4.1. リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
from("yammer:messages?consumerKey=aConsumerKey&consumerSecret=aConsumerSecretKey&accessToken=aAccessToken")
.to("mock:result");
{
"messages":[
{
"replied_to_id":null,
"network_id":7654,
"url":"https://www.yammer.com/api/v1/messages/305298242",
"thread_id":305298242,
"id":305298242,
"message_type":"update",
"chat_client_sequence":null,
"body":{
"parsed":"Testing yammer API...",
"plain":"Testing yammer API...",
"rich":"Testing yammer API..."
},
"client_url":"https://www.yammer.com/",
"content_excerpt":"Testing yammer API...",
"created_at":"2013/06/25 18:14:45 +0000",
"client_type":"Web",
"privacy":"public",
"sender_type":"user",
"liked_by":{
"count":1,
"names":[
{
"permalink":"janstey",
"full_name":"Jonathan Anstey",
"user_id":1499642294
}
]
},
"sender_id":1499642294,
"language":null,
"system_message":false,
"attachments":[
],
"direct_message":false,
"web_url":"https://www.yammer.com/redhat.com/messages/305298242"
},
{
"replied_to_id":null,
"network_id":7654,
"url":"https://www.yammer.com/api/v1/messages/294326302",
"thread_id":294326302,
"id":294326302,
"message_type":"system",
"chat_client_sequence":null,
"body":{
"parsed":"(Principal Software Engineer) has [[tag:14658]] the redhat.com network. Take a moment to welcome Jonathan.",
"plain":"(Principal Software Engineer) has #joined the redhat.com network. Take a moment to welcome Jonathan.",
"rich":"(Principal Software Engineer) has #joined the redhat.com network. Take a moment to welcome Jonathan."
},
"client_url":"https://www.yammer.com/",
"content_excerpt":"(Principal Software Engineer) has #joined the redhat.com network. Take a moment to welcome Jonathan.",
"created_at":"2013/05/10 19:08:29 +0000",
"client_type":"Web",
"sender_type":"user",
"privacy":"public",
"liked_by":{
"count":0,
"names":[
]
}
}
]
}
Exchange exchange = mock.getExchanges().get(0);
Messages messages = exchange.getIn().getBody(Messages.class);
assertEquals(2, messages.getMessages().size());
assertEquals("Testing yammer API...", messages.getMessages().get(0).getBody().getPlain());
assertEquals("(Principal Software Engineer) has #joined the redhat.com network. Take a moment to welcome Jonathan.", messages.getMessages().get(1).getBody().getPlain());