// test getExistingBridges
XBridge xBridges[] = bridgeFactory.getExistingBridges();
assure("", UnoRuntime.areSame(xBridge, xBridges[0]));
// dispose the bridge
XComponent xComponent = (XComponent)UnoRuntime.queryInterface(XComponent.class, xBridge);
xComponent.dispose();
// test that the bridge has been removed
assure("", bridgeFactory.getBridge("testbridge") == null);
rightSide = new PipedConnection(new Object[0]);
leftSide = new PipedConnection(new Object[]{rightSide});
// test that we really get a new bridge
XBridge xBridge_new = bridgeFactory.createBridge("testbridge", "urp", (XConnection)leftSide, null);
assure("", !UnoRuntime.areSame(xBridge, xBridge_new));
for(int i = 0; i <10000; ++ i) {
Object x[] = new Object[100];
}
// test getExistingBridges
xBridges = bridgeFactory.getExistingBridges();
assure("",
xBridges.length == 1
&& UnoRuntime.areSame(xBridge_new, xBridges[0]));
// dispose the new bridge
XComponent xComponent_new = (XComponent)UnoRuntime.queryInterface(XComponent.class, xBridge_new);
xComponent_new.dispose();
}