// Discover the information of another Smack client
DiscoverInfo info = discoManager.discoverInfo(getFullJID(1));
// Check the identity of the Smack client
Iterator<Identity> identities = info.getIdentities();
assertTrue("No identities were found", identities.hasNext());
Identity identity = identities.next();
assertEquals("Name in identity is wrong", ServiceDiscoveryManager.getIdentityName(),
identity.getName());
assertEquals("Category in identity is wrong", "client", identity.getCategory());
assertEquals("Type in identity is wrong", ServiceDiscoveryManager.getIdentityType(),
identity.getType());
assertFalse("More identities were found", identities.hasNext());
}
catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());