xmppSession1.send(new Presence(Presence.Show.AWAY));
}
@Test
public void testServiceDiscoveryEntry() {
TestXmppSession xmppSession1 = new TestXmppSession();
LastActivityManager lastActivityManager = xmppSession1.getExtensionManager(LastActivityManager.class);
// By default, the manager should be enabled.
Assert.assertTrue(lastActivityManager.isEnabled());
ServiceDiscoveryManager serviceDiscoveryManager = xmppSession1.getExtensionManager(ServiceDiscoveryManager.class);
Feature feature = new Feature("jabber:iq:last");
Assert.assertTrue(serviceDiscoveryManager.getFeatures().contains(feature));
lastActivityManager.setEnabled(false);
Assert.assertFalse(lastActivityManager.isEnabled());
Assert.assertFalse(serviceDiscoveryManager.getFeatures().contains(feature));