public void testCompositeActivity() {
    BpelDefinition processDefinition = new BpelDefinition();
    CompositeActivity parent = new Sequence("parent");
    processDefinition.addNode(parent);

    Activity activity = new Empty("activity");
    parent.addNode(activity);

    processDefinition = saveAndReload(processDefinition);

    parent = (CompositeActivity) processDefinition.getNode("parent");
    activity = (Activity) parent.getNode("activity");
    assertNotNull(activity);
    assertNotNull(parent);
    assertSame(activity, parent.getNode("activity"));
    assertSame(activity.getCompositeActivity(), parent);
  }
  @Override
  public void start(AcceptsOneWidget panel, EventBus eventBus) {
    final BuyStockView buyStockView = getClientFactory().getView(BuyStockView.class);
    buyStockView.setActivity(this);
    panel.setWidget(buyStockView.asWidget());

    String symbol = getPlace().getSymbol();
    Stock stock = getClientFactory().getClientSession().getAvailableStock(symbol);
    if (stock != null) {
      buyStockView.updateView(stock);
    }

    // add Sub Activities
    logoActivity = new LogoActivity(getClientFactory(), getPlace(), this);
    statusActivity = new StatusActivity(getClientFactory(), getPlace(), this);
    addSubActivity(buyStockView.getLogoPanel(), logoActivity);
    addSubActivity(buyStockView.getStatusPanel(), statusActivity);
    // super.start will start all Sub activities
    super.start(panel, eventBus);
  }