@Test
public void testDetails() {

    Context context = getApplicationContext();
    Route route = new MockUtils.MockRouteBuilder().getRoute();
    Spannable spannable = RouteUtil.getDetails(context, route, UnitSystem.METRIC);
    SpannableStringBuilder expectedDetails = new SpannableStringBuilder(
            DistanceFormatterUtil.format(getApplicationContext(), 1000, UnitSystem.METRIC));
    assertThat(spannable.toString(), equalTo(expectedDetails + "   RouteName"));
    route = new MockUtils.MockRouteBuilder().setTransportMode(RouteOptions.TransportMode.PUBLIC_TRANSPORT).getRoute();
    Spannable spannable2 = RouteUtil.getDetails(context, route, UnitSystem.METRIC);
    assertTrue(spannable2.toString().isEmpty());
}