### Question:
RouteProgress { public int remainingWaypoints() { return directionsRoute().legs().size() - legIndex(); }  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 remainingWaypoints_firstLegReturnsTwoWaypoints() throws Exception { DirectionsRoute multiLegRoute = buildMultipleLegRoute(); RouteProgress routeProgress = buildBeginningOfLegRouteProgress(multiLegRoute); assertEquals(2, routeProgress.remainingWaypoints()); }