@Override
    public Optional<Track<T>> clean(Track<T> track) {

        NavigableSet<Point<T>> points = newTreeSet(track.points());

        Set<Point<T>> badPoints = findPointsWithoutEnoughTimeSpacing(track);

        points.removeAll(badPoints);

        return (points.isEmpty())
            ? Optional.empty()
            : Optional.of(Track.of(points));
    }
@Test
    public void testCleaningExample1() {

        Track<NopHit> testTrack = createTrackFromResource(
            HighFrequencyPointRemover.class,
            "highFrequencyPoints_example1.txt"
        );

        Duration MIN_ALLOWABLE_SPACING = Duration.ofMillis(500);

        DataCleaner<Track<NopHit>> smoother = new HighFrequencyPointRemover<>(MIN_ALLOWABLE_SPACING);

        Optional<Track<NopHit>> cleanedTrack = smoother.clean(testTrack);

        assertEquals(
            20, testTrack.size(),
            "This original track has 20 points"
        );

        assertEquals(
            13, cleanedTrack.get().size(),
            "The cleaned track should have 7 points removed (2 pairs and a set of 3)"
        );
    }