template.sendBody("direct:start", "B");
template.sendBody("direct:start", "C");
template.sendBody("direct:start", "D");
template.sendBody("direct:start", "E");
SedaEndpoint seda = context.getEndpoint("seda:foo", SedaEndpoint.class);
assertEquals(5, seda.getCurrentQueueSize());
String body = consumer.receiveBody(seda, 1000, String.class);
assertEquals("A", body);
assertEquals(4, seda.getCurrentQueueSize());
body = consumer.receiveBody(seda, 1000, String.class);
assertEquals("B", body);
assertEquals(3, seda.getCurrentQueueSize());
body = consumer.receiveBody(seda, 1000, String.class);
assertEquals("C", body);
assertEquals(2, seda.getCurrentQueueSize());
body = consumer.receiveBody(seda, 1000, String.class);
assertEquals("D", body);
assertEquals(1, seda.getCurrentQueueSize());
body = consumer.receiveBody(seda, 1000, String.class);
assertEquals("E", body);
assertEquals(0, seda.getCurrentQueueSize());
}