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

    addServiceAndVersion();
    addObservationValues();
    parameters.removeParameterShell(INSERT_OBSERVATION_PHENOMENON_TIME);
    parameters.addParameterShell(INSERT_OBSERVATION_PHENOMENON_TIME,phenTimePeriod);
    final String insertObservation = builder.buildInsertObservationRequest(parameters);
    final TimePeriodType phenomenonTime = (TimePeriodType)InsertObservationDocument.Factory.parse(insertObservation)
            .getInsertObservation()
            .getObservationArray(0)
            .getOMObservation()
            .getPhenomenonTime()
            .getAbstractTimeObject();
    assertThat(phenomenonTime.getBeginPosition().getStringValue(), is(phenTimePeriodStart.toISO8601Format()));
    assertThat(phenomenonTime.getEndPosition().getStringValue(), is(phenTimePeriodEnd.toISO8601Format()));
}