@Test
public void testSettingDynamicPenalty() {

    DynamicPenalty dynamicPenalty = MockUtils.getDynamicPenality(Route.TrafficPenaltyMode.AVOID_LONG_TERM_CLOSURES);
    mTrafficOptionsPanel.setDynamicPenalty(dynamicPenalty);
    final List<OptionItem> items = mTrafficOptionsPanel.getOptionItems();
    assertThat(items.size(), equalTo(1));
    SingleChoiceOptionItem item = (SingleChoiceOptionItem) items.get(0);
    final List<String> labels = item.getLabels();
    assertThat(labels.size(), equalTo(3));
    String selectedId = item.getSelectedItemLabel();
    assertThat(selectedId, equalTo(getString(R.string.msdkui_avoid_long_term_closures)));
    dynamicPenalty = MockUtils.getDynamicPenality(Route.TrafficPenaltyMode.DISABLED);
    mTrafficOptionsPanel.setDynamicPenalty(dynamicPenalty);
    selectedId = item.getSelectedItemLabel();
    assertThat(selectedId, equalTo(getString(R.string.msdkui_disabled)));
}