@Test
public void testFragmentsAreMergedInProviderOrder() {

    final List<StateOption> options = List.of(new StateOption("value", "label"));
    StateDescriptionFragment stateDescriptionFragment1 = StateDescriptionFragmentBuilder.create()
            .withMinimum(BigDecimal.ZERO) //
            .withMaximum(BigDecimal.TEN) //
            .withPattern("pattern") //
            .withReadOnly(Boolean.TRUE) //
            .withOptions(options).build();
    registerStateDescriptionFragmentProvider(stateDescriptionFragment1, -1);
    StateDescriptionFragment stateDescriptionFragment2 = StateDescriptionFragmentBuilder.create()
            .withMinimum(BigDecimal.ONE) //
            .withMaximum(BigDecimal.ONE) //
            .withStep(BigDecimal.ONE) //
            .withPattern("base_pattern") //
            .withOptions(options).build();
    registerStateDescriptionFragmentProvider(stateDescriptionFragment2, -2);
    StateDescription stateDescription = item.getStateDescription();
    assertThat(stateDescription.getMinimum(), is(BigDecimal.ZERO));
    assertThat(stateDescription.getMaximum(), is(BigDecimal.TEN));
    assertThat(stateDescription.getStep(), is(BigDecimal.ONE));
    assertThat(stateDescription.getPattern(), is("pattern"));
    assertThat(stateDescription.isReadOnly(), is(true));
    assertThat(stateDescription.getOptions(), is(options));
}