public void testControlledAcquisition() {
   Experiment experiment = ExperimentModelFactory.createSimpleControlledExperiment();
   ExperimentUserReport report = ExperimentUserReportUtils.createExperimentUserReport(experiment);
   StringWriter writer = new StringWriter();
   ExperimentUserReportUtils.getXStream().toXML(report, writer);
   ExperimentUserReport loadedReport =
       (ExperimentUserReport)
           ExperimentUserReportUtils.getXStream().fromXML(writer.getBuffer().toString());
   System.out.println(loadedReport);
 }
  public void testNormalAcqusitionReport() {
    // Prepares experiment model
    Experiment experiment = ExperimentModelFactory.createSimpleNormalExperiment();

    ExperimentUserReport report = ExperimentUserReportUtils.createExperimentUserReport(experiment);

    assertEquals(experiment.getTitle(), report.getTitle());
    assertEquals(experiment.getUser().getName(), report.getName());
    assertEquals(experiment.getInstrumentConfigs().size(), report.getConfigs().size());

    StringWriter writer = new StringWriter();
    ExperimentUserReportUtils.getXStream().toXML(report, writer);
    ExperimentUserReport loadedReport =
        (ExperimentUserReport)
            ExperimentUserReportUtils.getXStream().fromXML(writer.getBuffer().toString());
    System.out.println(loadedReport);
  }