### Question:
NavigationHelper { static List<Milestone> checkMilestones(RouteProgress previousRouteProgress, RouteProgress routeProgress, MapboxNavigation mapboxNavigation) { List<Milestone> milestones = new ArrayList<>(); for (Milestone milestone : mapboxNavigation.getMilestones()) { if (milestone.isOccurring(previousRouteProgress, routeProgress)) { milestones.add(milestone); } } return milestones; } 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 checkMilestones_onlyTriggeredMilestonesGetReturned() throws Exception { RouteProgress routeProgress = buildMultiLegRouteProgress(); MapboxNavigationOptions options = MapboxNavigationOptions.builder() .defaultMilestonesEnabled(false).build(); Context context = mock(Context.class); when(context.getApplicationContext()).thenReturn(mock(Context.class)); MapboxNavigation mapboxNavigation = new MapboxNavigation(context, ACCESS_TOKEN, options, mock(NavigationTelemetry.class), mock(LocationEngine.class)); mapboxNavigation.addMilestone(new StepMilestone.Builder() .setTrigger(Trigger.eq(TriggerProperty.STEP_INDEX, 0)) .setIdentifier(1001).build()); mapboxNavigation.addMilestone(new StepMilestone.Builder() .setTrigger(Trigger.eq(TriggerProperty.STEP_INDEX, 4)) .setIdentifier(1002).build()); List<Milestone> triggeredMilestones = checkMilestones(routeProgress, routeProgress, mapboxNavigation); assertEquals(1, triggeredMilestones.size()); assertEquals(1001, triggeredMilestones.get(0).getIdentifier()); assertNotSame(1002, triggeredMilestones.get(0).getIdentifier()); }