### Question:
NavigationHelper { @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; } private  NavigationHelper(); @NonNull static List<StepIntersection> createIntersectionsList(@NonNull LegStep currentStep, LegStep upcomingStep); @NonNull static List<Pair<StepIntersection, Double>> createDistancesToIntersections(List<Point> stepPoints,
                                                                             List<StepIntersection> intersections); static StepIntersection findCurrentIntersection(@NonNull List<StepIntersection> intersections,
                                                  @NonNull List<Pair<StepIntersection, Double>> measuredIntersections,
                                                  double stepDistanceTraveled); static StepIntersection findUpcomingIntersection(@NonNull List<StepIntersection> intersections,
                                                   @Nullable LegStep upcomingStep,
                                                   StepIntersection currentIntersection); @Nullable static CurrentLegAnnotation createCurrentAnnotation(CurrentLegAnnotation currentLegAnnotation,
                                                      RouteLeg leg, double legDistanceRemaining);  }### Answer:
@Test public void createIntersectionList_returnsCompleteIntersectionList() throws Exception { RouteProgress routeProgress = buildMultiLegRouteProgress(); LegStep currentStep = routeProgress.currentLegProgress().currentStep(); LegStep upcomingStep = routeProgress.currentLegProgress().upComingStep(); List<StepIntersection> intersections = NavigationHelper.createIntersectionsList(currentStep, upcomingStep); int correctListSize = currentStep.intersections().size() + 1; assertTrue(correctListSize == intersections.size()); }
@Test public void createIntersectionList_upcomingStepNull_returnsCurrentStepIntersectionList() throws Exception { RouteProgress routeProgress = buildMultiLegRouteProgress(); LegStep currentStep = routeProgress.currentLegProgress().currentStep(); LegStep upcomingStep = null; List<StepIntersection> intersections = NavigationHelper.createIntersectionsList(currentStep, upcomingStep); int correctListSize = currentStep.intersections().size() + 1; assertFalse(correctListSize == intersections.size()); }