### Question:
NavigationHelper { static boolean isUserOffRoute(NavigationLocationUpdate navigationLocationUpdate, RouteProgress routeProgress, OffRouteCallback callback) { MapboxNavigationOptions options = navigationLocationUpdate.mapboxNavigation().options(); if (!options.enableOffRouteDetection()) { return false; } OffRoute offRoute = navigationLocationUpdate.mapboxNavigation().getOffRouteEngine(); setOffRouteDetectorCallback(offRoute, callback); Location location = navigationLocationUpdate.location(); return offRoute.isUserOffRoute(location, routeProgress, options); } private  NavigationHelper(); @NonNull static List<StepIntersection> createIntersectionsList(@NonNull LegStep currentStep, LegStep upcomingStep); @NonNull static List<Pair<StepIntersection, Double>> createDistancesToIntersections(List<Point> stepPoints,
                                                                             List<StepIntersection> intersections); static StepIntersection findCurrentIntersection(@NonNull List<StepIntersection> intersections,
                                                  @NonNull List<Pair<StepIntersection, Double>> measuredIntersections,
                                                  double stepDistanceTraveled); static StepIntersection findUpcomingIntersection(@NonNull List<StepIntersection> intersections,
                                                   @Nullable LegStep upcomingStep,
                                                   StepIntersection currentIntersection); @Nullable static CurrentLegAnnotation createCurrentAnnotation(CurrentLegAnnotation currentLegAnnotation,
                                                      RouteLeg leg, double legDistanceRemaining);  }### Answer:
@Test public void offRouteDetectionDisabled_isOffRouteReturnsFalse() throws Exception { MapboxNavigationOptions options = MapboxNavigationOptions.builder() .enableOffRouteDetection(false) .build(); Context context = mock(Context.class); when(context.getApplicationContext()).thenReturn(mock(Context.class)); MapboxNavigation mapboxNavigation = new MapboxNavigation(context, ACCESS_TOKEN, options, mock(NavigationTelemetry.class), mock(LocationEngine.class)); NavigationLocationUpdate model = NavigationLocationUpdate.create(mock(Location.class), mapboxNavigation); boolean userOffRoute = isUserOffRoute(model, mock(RouteProgress.class), mock(OffRouteCallback.class)); assertFalse(userOffRoute); }