ServiceDiscoveryManager discoManager = ServiceDiscoveryManager
.getInstanceFor(getConnection(0));
try {
// Discover the information of another Smack client
DiscoverInfo info = discoManager.discoverInfo(getFullJID(1));
// Check the identity of the Smack client
Iterator identities = info.getIdentities();
assertTrue("No identities were found", identities.hasNext());
DiscoverInfo.Identity identity = (DiscoverInfo.Identity)identities.next();
assertEquals("Name in identity is wrong", ServiceDiscoveryManager.getIdentityName(),
identity.getName());
assertEquals("Category in identity is wrong", "client", identity.getCategory());