protected void onSetUp(org.geoserver.data.test.SystemTestData testData) throws Exception {
    Catalog catalog = getCatalog();

    // add layers
    testData.addVectorLayer(LAKES, catalog);
    testData.addVectorLayer(BRIDGES, catalog);
    testData.addVectorLayer(FORESTS, catalog);
    testData.addVectorLayer(BUILDINGS, catalog);

    setupExtras(testData, catalog);
  }
  void setupExtras(org.geoserver.data.test.SystemTestData testData, Catalog catalog)
      throws IOException {
    // associate Lakes to Buildings as an extra style
    LayerInfo buildings = catalog.getLayerByName(getLayerId(BUILDINGS));
    buildings.getStyles().add(catalog.getStyleByName(LAKES.getLocalPart()));
    catalog.save(buildings);

    // add a layer group
    CatalogFactory factory = catalog.getFactory();
    LayerGroupInfo globalGroup = factory.createLayerGroup();
    globalGroup.setName(LAKES_GROUP);
    globalGroup.getLayers().add(catalog.getLayerByName(getLayerId(LAKES)));
    globalGroup.getLayers().add(catalog.getLayerByName(getLayerId(FORESTS)));
    globalGroup.getLayers().add(catalog.getLayerByName(getLayerId(BRIDGES)));
    catalog.add(globalGroup);

    // add a layer group containing a layer group
    LayerGroupInfo nestGroup = factory.createLayerGroup();
    nestGroup.setName(NEST_GROUP);
    nestGroup.getLayers().add(catalog.getLayerByName(getLayerId(LAKES)));
    nestGroup.getLayers().add(globalGroup);
    catalog.add(nestGroup);

    // add a workspace specific style
    WorkspaceInfo ws = catalog.getWorkspaceByName(CITE_PREFIX);
    testData.addStyle(ws, WS_STYLE, "Streams.sld", SystemTestData.class, catalog);
  };