// since we have no messages, there should be no items.
assertEquals(0, inner.size());
}
public void testNodeItemsSome() throws Exception {
LeafNode node = new LeafNode(serviceConfiguration, "news", "News", client);
root.add(node);
XMLElement item1 = new XMLElement("namespace1", "item1", null, (Attribute[]) null, (XMLFragment[]) null);
XMLElement item2 = new XMLElement("namespace2", "item2", null, (Attribute[]) null, (XMLFragment[]) null);
XMLElement item3 = new XMLElement("namespace3", "item3", null, (Attribute[]) null, (XMLFragment[]) null);
node.publish(client, relay, "itemid1", item1);
Thread.sleep(10);
node.publish(client, relay, "itemid2", item1); // publish this one with the same id as the next one (overwritten by the next)
node.publish(client, relay, "itemid2", item2); // overwrite the prev. item (use the same itemid)
Thread.sleep(10);
node.publish(client, relay, "itemid3", item3);
DefaultDiscoInfoStanzaGenerator sg = (DefaultDiscoInfoStanzaGenerator) getDefaultStanzaGenerator();
Stanza stanza = sg.getStanza(client, pubsubService.getBareJID(), "id123", "news");
ResponseStanzaContainer result = sendStanza(stanza, true);