Exemplo n.º 1
0
  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());
  }