### Question:
RouteUtils { public boolean isNewRoute(@Nullable RouteProgress previousRouteProgress, @NonNull RouteProgress routeProgress) { return isNewRoute(previousRouteProgress, routeProgress.directionsRoute()); }  boolean isNewRoute(@Nullable RouteProgress previousRouteProgress,
                            @NonNull RouteProgress routeProgress); boolean isNewRoute(@Nullable RouteProgress previousRouteProgress,
                            @NonNull DirectionsRoute directionsRoute); boolean isArrivalEvent(@NonNull RouteProgress routeProgress, @NonNull Milestone milestone); boolean isLastLeg(RouteProgress routeProgress); @Nullable List<Point> calculateRemainingWaypoints(RouteProgress routeProgress); @Nullable String[] calculateRemainingWaypointNames(RouteProgress routeProgress); Location createFirstLocationFromRoute(DirectionsRoute route); boolean isValidRouteProfile(String routeProfile); @Nullable BannerInstructions findCurrentBannerInstructions(LegStep currentStep, double stepDistanceRemaining); @Nullable BannerText findCurrentBannerText(LegStep currentStep, double stepDistanceRemaining,
                                          boolean findPrimary); @Nullable VoiceInstructions findCurrentVoiceInstructions(LegStep currentStep, double stepDistanceRemaining);  }### Answer:
@Test public void isNewRoute_returnsTrueWhenPreviousGeometriesNull() throws Exception { RouteProgress defaultRouteProgress = buildDefaultTestRouteProgress(); RouteUtils routeUtils = new RouteUtils(); boolean isNewRoute = routeUtils.isNewRoute(null, defaultRouteProgress); assertTrue(isNewRoute); }
@Test public void isNewRoute_returnsFalseWhenGeometriesEqualEachOther() throws Exception { RouteProgress previousRouteProgress = buildDefaultTestRouteProgress(); RouteUtils routeUtils = new RouteUtils(); boolean isNewRoute = routeUtils.isNewRoute(previousRouteProgress, previousRouteProgress); assertFalse(isNewRoute); }
@Test public void isNewRoute_returnsTrueWhenGeometriesDoNotEqual() throws Exception { DirectionsRoute aRoute = buildTestDirectionsRoute(); RouteProgress defaultRouteProgress = buildDefaultTestRouteProgress(); RouteProgress previousRouteProgress = defaultRouteProgress.toBuilder() .directionsRoute(aRoute.toBuilder().geometry("vfejnqiv").build()) .build(); RouteUtils routeUtils = new RouteUtils(); boolean isNewRoute = routeUtils.isNewRoute(previousRouteProgress, defaultRouteProgress); assertTrue(isNewRoute); }