@NonNull
  public static List<StepIntersection> createIntersectionsList(@NonNull LegStep currentStep, LegStep upcomingStep) {
    List<StepIntersection> intersectionsWithNextManeuver = new ArrayList<>();
    intersectionsWithNextManeuver.addAll(currentStep.intersections());
    if (upcomingStep != null && !upcomingStep.intersections().isEmpty()) {
      intersectionsWithNextManeuver.add(upcomingStep.intersections().get(FIRST_POINT));
    }
    return intersectionsWithNextManeuver;
  }
@ NonNull public static List < StepIntersection > createIntersectionsList ( @ NonNull LegStep currentStep , LegStep upcomingStep ) { List < StepIntersection > intersectionsWithNextManeuver = new ArrayList < > ( ) ; intersectionsWithNextManeuver . addAll ( currentStep . intersections ( ) ) ; if ( upcomingStep != null && ! upcomingStep . intersections ( ) . isEmpty ( ) ) { intersectionsWithNextManeuver . add ( upcomingStep . intersections ( ) . get ( FIRST_POINT ) ) ; } return intersectionsWithNextManeuver ; }
Given a current and upcoming step, this method assembles a list of {@link StepIntersection}
consisting of all of the current step intersections, as well as the first intersection of
the upcoming step (if the upcoming step isn't null).

@param currentStep  for intersections list
@param upcomingStep for first intersection, if not null
@return complete list of intersections
@since 0.13.0