### Question:
NMEAFilters { public static final Predicate<NMEASample> periodicFilter(long period, TimeUnit unit) { return new PeriodicFilter(unit.toMillis(period)); }  static final Predicate<NMEASample> periodicFilter(long period, TimeUnit unit); static final Predicate<NMEASample> containsAllFilter(String... properties); static final UnaryOperator<NMEASample> accumulatorMap(); static final Stream<NMEASample> bearingToleranceFilter(Stream<NMEASample> stream, double bearingTolerance); static final Predicate<NMEASample> minDistanceFilter(double minDistance); static final Predicate<NMEASample> locationFilter(float maxAcceleration); static final Predicate<NMEASample> propertyAccelerationFilter(String property, float maxAcceleration); static final Predicate<NMEASample> rangeFilter(String property, float min, float max); static final Predicate<NMEASample> timeFilter();  }### Answer:
@Test public void testPeriodicFilter() { NMEAStream.Builder builder = new NMEAStream.Builder(); builder.addWaypoint(0, 0, 0); builder.addWaypoint(1, 0, 0); builder.addWaypoint(2, 0, 0); List<NMEASample> list = builder.build().filter(NMEAFilters.periodicFilter(1, TimeUnit.MILLISECONDS)).collect(Collectors.toList()); assertEquals(2, list.size()); assertEquals(0, list.get(0).getTime()); assertEquals(2, list.get(1).getTime()); }