@Test
public void buildInsertObservation_should_add_offerings() throws XmlException, OXFException {

    /*
     * MULTIPLE OFFERINGS
     */
    addServiceAndVersion();
    addObservationValues();
    final String offering1 = "test-offering-1";
    final String offering2 = "test-offering-2";
    parameters.removeParameterShell(INSERT_OBSERVATION_OFFERINGS_PARAMETER);
    parameters.addParameterShell(INSERT_OBSERVATION_OFFERINGS_PARAMETER,offering1,offering2);
    String insertObservation = builder.buildInsertObservationRequest(parameters);
    InsertObservationType insertObservationType = InsertObservationDocument.Factory.parse(insertObservation)
            .getInsertObservation();
    assertThat(insertObservationType.getOfferingArray().length, is(2));
    assertThat(insertObservationType.getOfferingArray(),hasItemInArray(offering1));
    assertThat(insertObservationType.getOfferingArray(),hasItemInArray(offering2));
    /*
     * SINGLE OFFERING
     */
    parameters = new ParameterContainer();
    addServiceAndVersion();
    addObservationValues();
    parameters.removeParameterShell(INSERT_OBSERVATION_OFFERINGS_PARAMETER);
    parameters.addParameterShell(INSERT_OBSERVATION_OFFERINGS_PARAMETER,offering1);
    insertObservation = builder.buildInsertObservationRequest(parameters);
    insertObservationType = InsertObservationDocument.Factory.parse(insertObservation).getInsertObservation();
    assertThat(insertObservationType.getOfferingArray().length, is(1));
    assertThat(insertObservationType.getOfferingArray(), hasItemInArray(offering1));
}