code: private boolean validSecondStep(LegStep secondStep, RouteProgress routeProgress) {
      return routeProgress.currentLegProgress().upComingStep() != null
        && routeProgress.currentLegProgress().upComingStep().equals(secondStep);
    }
docs: The second step of the new route is valid if
  it equals the current route upcoming step.
  
  @param secondStep of the new route
  @param routeProgress current route progress
  @return true if valid, false if not