### Question:
RouteProgress { public abstract double distanceRemaining();  abstract DirectionsRoute directionsRoute(); abstract int legIndex(); @NonNull RouteLeg currentLeg(); double distanceTraveled(); double durationRemaining(); float fractionTraveled(); abstract double distanceRemaining(); int remainingWaypoints(); abstract RouteLegProgress currentLegProgress(); abstract List<Point> currentStepPoints(); @Nullable abstract List<Point> upcomingStepPoints(); abstract RouteProgress.Builder toBuilder(); static Builder builder();  }### Answer:
@Test public void multiLeg_distanceRemaining_equalsRouteDistanceAtBeginning() throws Exception { DirectionsRoute multiLegRoute = buildMultipleLegRoute(); RouteProgress routeProgress = buildBeginningOfLegRouteProgress(multiLegRoute); assertEquals(multiLegRoute.distance(), routeProgress.distanceRemaining(), LARGE_DELTA); }
@Test public void multiLeg_distanceRemaining_equalsZeroAtEndOfRoute() throws Exception { RouteProgress routeProgress = buildEndOfMultiRouteProgress(); assertEquals(0, routeProgress.distanceRemaining(), DELTA); }
@Test public void distanceRemaining_equalsRouteDistanceAtBeginning() throws Exception { DirectionsRoute route = buildTestDirectionsRoute(); RouteProgress beginningRouteProgress = buildBeginningOfLegRouteProgress(route); assertEquals(route.distance(), beginningRouteProgress.distanceRemaining(), LARGE_DELTA); }
@Test public void distanceRemaining_equalsZeroAtEndOfRoute() throws Exception { DirectionsRoute route = buildTestDirectionsRoute(); RouteLeg firstLeg = route.legs().get(0); RouteProgress lastRouteProgress = buildLastRouteProgress(route, firstLeg); assertEquals(0, lastRouteProgress.distanceRemaining(), DELTA); }