@Before
  public void insertTestSensor() throws OwsExceptionReport, XmlException, IOException {
    // Inserts the sensor
    String basePath = (this.getClass().getResource("/Requests").getFile());
    File sensor_file = new File(basePath + "/testSensor.xml");
    SensorMLDocument doc = SensorMLDocument.Factory.parse(sensor_file);
    SensorMLDecoder d = new SensorMLDecoder();
    this.sensor = d.decode(doc);
    log.trace(this.sensor.getText().toArray()[0].toString());

    // FIXME Moh-Yakoub: probably this will take some configuration - haven't decided yet.
    SOLRInsertSensorInfoDAO dao = new SOLRInsertSensorInfoDAO(connection);
    this.id = dao.insertSensor(this.sensor);
  }
 private String addSensorMLWrapperForXmlDescription(final AbstractProcessType xbProcessType) {
   final SensorMLDocument xbSensorMLDoc =
       SensorMLDocument.Factory.newInstance(XmlOptionsHelper.getInstance().getXmlOptions());
   final net.opengis.sensorML.x101.SensorMLDocument.SensorML xbSensorML =
       xbSensorMLDoc.addNewSensorML();
   xbSensorML.setVersion(SensorMLConstants.VERSION_V101);
   final Member member = xbSensorML.addNewMember();
   final AbstractProcessType xbAbstractProcessType =
       (AbstractProcessType)
           member
               .addNewProcess()
               .substitute(
                   getQnameForType(xbProcessType.schemaType()), xbProcessType.schemaType());
   xbAbstractProcessType.set(xbProcessType);
   return xbSensorMLDoc.xmlText(XmlOptionsHelper.getInstance().getXmlOptions());
 }