@Test
public void testChangeListener() {

    DynamicPenalty dynamicPenalty = MockUtils.getDynamicPenality(Route.TrafficPenaltyMode.DISABLED);
    mTrafficOptionsPanel.setDynamicPenalty(dynamicPenalty);
    mTrafficOptionsPanel.setListener(new OptionsPanel.Listener() {
        @Override
        public void onOptionCreated(List<OptionItem> item) {
            mCallbackCalled = false;
        }
        @Override
        public void onOptionChanged(OptionItem item) {
            mCallbackCalled = true;
        }
    });
    // negate one part
    dynamicPenalty = MockUtils.getDynamicPenality(Route.TrafficPenaltyMode.AVOID_LONG_TERM_CLOSURES);
    mTrafficOptionsPanel.setDynamicPenalty(dynamicPenalty);
    assertThat(mCallbackCalled, is(true));
}