@Test
public void testServiceWithOneStateDescriptionProvider() {

    StateDescriptionFragment stateDescriptionFragment = StateDescriptionFragmentBuilder.create()
            .withMinimum(STATE_DESCRIPTION_PROVIDER_DEFAULT_MIN_VALUE)
            .withMaximum(STATE_DESCRIPTION_PROVIDER_DEFAULT_MAX_VALUE)
            .withStep(STATE_DESCRIPTION_PROVIDER_DEFAULT_STEP)
            .withPattern(STATE_DESCRIPTION_PROVIDER_DEFAULT_PATTERN)
            .withReadOnly(STATE_DESCRIPTION_PROVIDER_DEFAULT_IS_READONLY)
            .withOptions(STATE_DESCRIPTION_PROVIDER_DEFAULT_OPTIONS).build();
    registerStateDescriptionFragmentProvider(stateDescriptionFragment,
            STATE_DESCRIPTION_PROVIDER_DEFAULT_SERVICE_RANKING);
    StateDescription stateDescription = item.getStateDescription();
    assertThat(stateDescription.getMinimum(), is(STATE_DESCRIPTION_PROVIDER_DEFAULT_MIN_VALUE));
    assertThat(stateDescription.getMaximum(), is(STATE_DESCRIPTION_PROVIDER_DEFAULT_MAX_VALUE));
    assertThat(stateDescription.getStep(), is(STATE_DESCRIPTION_PROVIDER_DEFAULT_STEP));
    assertThat(stateDescription.getPattern(), is(STATE_DESCRIPTION_PROVIDER_DEFAULT_PATTERN));
    assertThat(stateDescription.isReadOnly(), is(STATE_DESCRIPTION_PROVIDER_DEFAULT_IS_READONLY));
    assertThat(stateDescription.getOptions(), is(STATE_DESCRIPTION_PROVIDER_DEFAULT_OPTIONS));
}