private ExperimentSeries getSeries(ScenarioInstance instance, String name)
      throws DataNotFoundException {
    for (ExperimentSeries series : instance.getExperimentSeriesList()) {
      if (series.getName().equals(name)) {
        return series;
      }
    }

    throw new DataNotFoundException("No ExperimentSeries '" + name + "' found..");
  }
  /**
   * Creates a SharedScenarioInstance out of a ScenarioInstance which can send to the FrontEnd.
   *
   * @param instance
   * @return
   */
  private SharedScenarioInstance convertInstance(ScenarioInstance instance) {
    SharedScenarioInstance retInstance = new SharedScenarioInstance();

    retInstance.setScenarioName(instance.getName());
    retInstance.setControllerUrl(instance.getMeasurementEnvironmentUrl());

    for (ExperimentSeries series : instance.getExperimentSeriesList()) {
      SharedExperimentSeries sharedSeries = new SharedExperimentSeries();
      sharedSeries.setExperimentName(series.getName());

      for (ExperimentSeriesRun run : series.getExperimentSeriesRuns()) {
        SharedExperimentRuns sharedRun = new SharedExperimentRuns();
        sharedRun.setTimestamp(run.getTimestamp());
        sharedRun.setLabel(run.getLabel());

        sharedSeries.addExperimentRun(sharedRun);
      }

      retInstance.addExperimentSeries(sharedSeries);
    }

    return retInstance;
  }