Search in sources :

Example 1 with FOMEntry

use of org.apache.abdera.parser.stax.FOMEntry in project quickstarts by jboss-switchyard.

the class CamelAtomPollTest method shouldRetrieveGreetings.

@Test
public void shouldRetrieveGreetings() throws Exception {
    _testKit.removeService("PrintService");
    final MockHandler printService = _testKit.registerInOnlyService("PrintService");
    Thread.sleep(10001);
    final LinkedBlockingQueue<Exchange> receivedMessages = printService.getMessages();
    for (Exchange e : receivedMessages) {
        FOMEntry entry = (FOMEntry) e.getMessage().getContent();
        Assert.assertNotNull(entry);
        Assert.assertTrue(entry.getTitle().equals(TITLE));
        Assert.assertTrue(entry.getId().toString().equals(ID));
    }
}
Also used : Exchange(org.switchyard.Exchange) MockHandler(org.switchyard.test.MockHandler) FOMEntry(org.apache.abdera.parser.stax.FOMEntry) Test(org.junit.Test)

Aggregations

FOMEntry (org.apache.abdera.parser.stax.FOMEntry)1 Test (org.junit.Test)1 Exchange (org.switchyard.Exchange)1 MockHandler (org.switchyard.test.MockHandler)1