RouteDescriptionItem extends BaseView { public boolean isBikeOrPedestrian() { final RouteOptions.TransportMode transportMode = mRoute.getRoutePlan().getRouteOptions().getTransportMode(); return transportMode == RouteOptions.TransportMode.BICYCLE || transportMode == RouteOptions.TransportMode.PEDESTRIAN; } RouteDescriptionItem(final Context context);  RouteDescriptionItem(final Context context, final AttributeSet attrs);  RouteDescriptionItem(final Context context, final AttributeSet attrs, final int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  RouteDescriptionItem(final Context context, final AttributeSet attrs, final int defStyleAttr,
            final int defStyleRes); void setSectionVisible(final Section section, final boolean visible); boolean isSectionVisible(final Section section); EnumSet<Section> getVisibleSections(); void setVisibleSections(final EnumSet<Section> sectionEnumSet); boolean isTrafficEnabled(); void setTrafficEnabled(final boolean isTraffic); Route getRoute(); void setRoute(final Route route); float getSectionBarScaling(); void setSectionBarScaling(final float sectionBarScaling); boolean isBikeOrPedestrian();  }
@Test public void testIsBikeOrPedestrian() { mRouteDescriptionItem.setRoute(new MockUtils.MockRouteBuilder().setTransportMode(RouteOptions.TransportMode.BICYCLE).getRoute()); assertTrue(mRouteDescriptionItem.isBikeOrPedestrian()); }