MuwsEventReceiver receiver = createSubscriptionReceiver(); subscription = system.subscribeToLifecycleEvents(receiver.getURL(), false); subscription.setReceiver(receiver);
subscription = system.subscribeToLifecycleEvents(createSubscriptionReceiver());
    protected SystemSession createSubscribedSystem() throws SmartFrogResolutionException,            RemoteException {        assertNull("subscription in use", subscription);        assertHosted();        SystemSession system = createSystem(null);        setSystem(system);        MuwsEventReceiver receiver = createSubscriptionReceiver();        subscription = system.subscribeToLifecycleEvents(receiver.getURL(), false);        subscription.setReceiver(receiver);        return system;    }