@Test
public void testTrafficDelayed() {

    //no delay
    Context context = getApplicationContext();
    Route route = new MockUtils.MockRouteBuilder().getRoute();
    Spannable spannable = RouteUtil.getTrafficDelayed(context, route);
    assertThat(spannable.toString().trim(),
            equalTo(getContextWithTheme().getString(R.string.msdkui_no_traffic_delays)));
    //road is blocked
    route = new MockUtils.MockRouteBuilder().setBlockedRoad().getRoute();
    spannable = RouteUtil.getTrafficDelayed(context, route);
    assertThat(spannable.toString().trim(),
            equalTo(getContextWithTheme().getString(R.string.msdkui_traffic_blocked)));
    //delayed
    int delayInMinutes = 10;
    route = new MockUtils.MockRouteBuilder().setTrafficPenaltyMinutes(10).getRoute();
    spannable = RouteUtil.getTrafficDelayed(context, route);
    assertThat(spannable.toString().trim(),
            equalTo(getContextWithTheme().getString(R.string.msdkui_incl_traffic_delay,
                    TimeFormatterUtil.format(getContextWithTheme(), TimeUnit.MINUTES.toMillis(delayInMinutes)))));
    //arrival time is defined
    route = new MockUtils.MockRouteBuilder().setArrivalTimeOption().getRoute();
    spannable = RouteUtil.getTrafficDelayed(context, route);
    assertTrue(spannable.toString().trim().isEmpty());
}