public void testCapsChanged() { String nodeVerBefore = EntityCapsManager.getNodeVersionByJid(con1.getUser()); sdm1.addFeature(DISCOVER_TEST_FEATURE); String nodeVerAfter = EntityCapsManager.getNodeVersionByJid(con1.getUser()); assertFalse(nodeVerBefore.equals(nodeVerAfter)); }
public void testEntityCaps() throws XMPPException, InterruptedException { dropWholeEntityCapsCache(); sdm1.addFeature(DISCOVER_TEST_FEATURE); Thread.sleep(3000); DiscoverInfo info = sdm0.discoverInfo(con1.getUser()); assertTrue(info.containsFeature(DISCOVER_TEST_FEATURE)); String u1ver = EntityCapsManager.getNodeVersionByJid(con1.getUser()); assertNotNull(u1ver); DiscoverInfo entityInfo = EntityCapsManager.caps.get(u1ver); assertNotNull(entityInfo); assertEquals(info.toXML(), entityInfo.toXML()); }