### Question:
InsertObservationParameters extends org.n52.oxf.sos.request.InsertObservationParameters { public boolean isSetOmParameter() { return omParameters.length > 0; } InsertObservationParameters(
            final ObservationParameters observationParameters,
            final Collection<String> offerings);  InsertObservationParameters(
            final ObservationParameters observationParameters,
            final Collection<String> offerings,
            final OmParameter... omParameters); @Override boolean isValid(); boolean isSetOmParameter(); OmParameter[] getOmParameter();  }### Answer:
@Test public void shouldReturnTrueOnlyIfOmParameterIsSet() { OmParameter[] omParameters = {new BooleanParameter("test", true)}; InsertObservationParameters parameters = new InsertObservationParameters(observationParameters, offerings, omParameters); Assert.assertThat(parameters.isSetOmParameter(), CoreMatchers.is(true)); parameters = new InsertObservationParameters(observationParameters, offerings); Assert.assertThat(parameters.isSetOmParameter(), CoreMatchers.is(false)); parameters = new InsertObservationParameters(observationParameters, offerings, new OmParameter[0]); Assert.assertThat(parameters.isSetOmParameter(), CoreMatchers.is(false)); }