throws Exception
{
XTest test = (XTest) UnoRuntime.queryInterface(
XTest.class, UnoUrlResolver.create(context).resolve(url));
WaitUnreachable u;
u = new WaitUnreachable(new XInterface() {});
test.setInterfaceToInterface((XInterface) u.get());
receive(test.getInterfaceFromInterface());
test.clearInterface();
u.waitUnreachable();
u = new WaitUnreachable(new XBase() {});
test.setInterfaceToInterface((XBase) u.get());
receive(test.getInterfaceFromInterface());
test.clearInterface();
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
test.setInterfaceToInterface((XDerived) u.get());
receive(test.getInterfaceFromInterface());
test.clearInterface();
u.waitUnreachable();
u = new WaitUnreachable(new XBase() {});
test.setBaseToInterface((XBase) u.get());
receive(test.getInterfaceFromInterface());
test.clearInterface();
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
test.setBaseToInterface((XDerived) u.get());
receive(test.getInterfaceFromInterface());
test.clearInterface();
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
test.setDerivedToInterface((XDerived) u.get());
receive(test.getInterfaceFromInterface());
test.clearInterface();
u.waitUnreachable();
u = new WaitUnreachable(new XBase() {});
test.setBaseToBase((XBase) u.get());
receive(test.getInterfaceFromBase());
receive(test.getBaseFromBase());
test.clearBase();
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
test.setBaseToBase((XDerived) u.get());
receive(test.getInterfaceFromBase());
receive(test.getBaseFromBase());
test.clearBase();
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
test.setDerivedToBase((XDerived) u.get());
receive(test.getInterfaceFromBase());
receive(test.getBaseFromBase());
test.clearBase();
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
test.setDerivedToDerived((XDerived) u.get());
receive(test.getInterfaceFromDerived());
receive(test.getBaseFromDerived());
receive(test.getDerivedFromDerived());
test.clearDerived();
u.waitUnreachable();
u = new WaitUnreachable(new XInterface() {});
receive(test.roundTripInterfaceToInterface((XInterface) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(new XBase() {});
receive(test.roundTripInterfaceToInterface((XBase) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
receive(test.roundTripInterfaceToInterface((XDerived) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(new XBase() {});
receive(test.roundTripBaseToInterface((XBase) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
receive(test.roundTripBaseToInterface((XDerived) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
receive(test.roundTripDerivedToInterface((XDerived) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(new XBase() {});
receive(test.roundTripBaseToBase((XBase) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
receive(test.roundTripBaseToBase((XDerived) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
receive(test.roundTripDerivedToBase((XDerived) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(new XDerived() {});
receive(test.roundTripDerivedToDerived((XDerived) u.get()));
u.waitUnreachable();
u = new WaitUnreachable(test);
test = null;
u.waitUnreachable();
System.out.println(
"Client and server both cleanly terminate now: Success");
}