@Test
public void testApplyingAndGettingOptionalParameters() {

    final TextObservationBuilder observationBuilder = ObservationBuilder.createObservationForTypeText();
    observationBuilder.addFoiId(INSERT_OBSERVATION_FOI_ID_PARAMETER);
    observationBuilder.addSamplingTime(INSERT_OBSERVATION_SAMPLING_TIME);
    observationBuilder.addNewFoiName(INSERT_OBSERVATION_NEW_FOI_NAME);
    observationBuilder.addFoiDescription(INSERT_OBSERVATION_NEW_FOI_DESC);
    observationBuilder.addFoiPosition(INSERT_OBSERVATION_NEW_FOI_POSITION);
    observationBuilder.addSrsPosition(INSERT_OBSERVATION_POSITION_SRS);
    observationBuilder.addObservedProperty(INSERT_OBSERVATION_OBSERVED_PROPERTY_PARAMETER);
    observationBuilder.addObservationValue(INSERT_OBSERVATION_VALUE_PARAMETER);
    final InsertObservationParameters iospb = new InsertObservationParameters("assignedSensorId", observationBuilder);
    final HashMap<String, String> hm = (HashMap<String, String>) iospb.getParameters();
    final String parMan_01 = hm.get(INSERT_OBSERVATION_PROCEDURE_PARAMETER);
    final String parMan_02 = hm.get(INSERT_OBSERVATION_TYPE);
    final String parOpt_01 = hm.get(INSERT_OBSERVATION_FOI_ID_PARAMETER);
    final String parOpt_02 = hm.get(INSERT_OBSERVATION_SAMPLING_TIME);
    final String parOpt_03 = hm.get(INSERT_OBSERVATION_NEW_FOI_NAME);
    final String parOpt_04 = hm.get(INSERT_OBSERVATION_NEW_FOI_DESC);
    final String parOpt_05 = hm.get(INSERT_OBSERVATION_NEW_FOI_POSITION);
    final String parOpt_06 = hm.get(INSERT_OBSERVATION_POSITION_SRS);
    final String parOpt_07 = hm.get(INSERT_OBSERVATION_OBSERVED_PROPERTY_PARAMETER);
    final String parOpt_08 = hm.get(INSERT_OBSERVATION_VALUE_PARAMETER);
    assertEquals("assignedSensorId", parMan_01);
    assertEquals(INSERT_OBSERVATION_TYPE_TEXT, parMan_02);
    assertEquals(INSERT_OBSERVATION_FOI_ID_PARAMETER, parOpt_01);
    assertEquals(INSERT_OBSERVATION_SAMPLING_TIME, parOpt_02);
    assertEquals(INSERT_OBSERVATION_NEW_FOI_NAME, parOpt_03);
    assertEquals(INSERT_OBSERVATION_NEW_FOI_DESC, parOpt_04);
    assertEquals(INSERT_OBSERVATION_NEW_FOI_POSITION, parOpt_05);
    assertEquals(INSERT_OBSERVATION_POSITION_SRS, parOpt_06);
    assertEquals(INSERT_OBSERVATION_OBSERVED_PROPERTY_PARAMETER, parOpt_07);
    assertEquals(INSERT_OBSERVATION_VALUE_PARAMETER, parOpt_08);
}