TestXmppSession connection1 = new TestXmppSession();
InBandByteStreamManager inBandBytestreamManager = connection1.getExtensionManager(InBandByteStreamManager.class);
// By default, the manager should be enabled.
Assert.assertTrue(inBandBytestreamManager.isEnabled());
ServiceDiscoveryManager serviceDiscoveryManager = connection1.getExtensionManager(ServiceDiscoveryManager.class);
Feature feature = new Feature("http://jabber.org/protocol/ibb");
Assert.assertTrue(serviceDiscoveryManager.getFeatures().contains(feature));
inBandBytestreamManager.setEnabled(false);
Assert.assertFalse(inBandBytestreamManager.isEnabled());
Assert.assertFalse(serviceDiscoveryManager.getFeatures().contains(feature));
}