@Override
    public void accept(Point newPoint) {

        //ensure this method is never called by multiple threads at the same time.
        parallelismDetector.run(
            () -> doAccept(newPoint)
        );
    }
@Test
    public void testTimeRegression_instantaneous() {

        TrackMaker maker = new TrackMaker(Duration.ofMinutes(5), new TestConsumer());

        maker.accept(newPoint("track1", Instant.EPOCH));
        maker.accept(newPoint("track1", Instant.EPOCH.plusSeconds(60L * 1)));
        maker.accept(newPoint("track1", Instant.EPOCH.plusSeconds(60L * 2)));
        maker.accept(newPoint("track1", Instant.EPOCH.plusSeconds(60L * 3)));
        maker.accept(newPoint("track1", Instant.EPOCH.plusSeconds(60L * 4)));
        maker.accept(newPoint("track1", Instant.EPOCH.plusSeconds(60L * 5)));

        Point badInputPoint = newPoint("track1", Instant.EPOCH);

        /*
         * The points supplied to a TrackMaker cannot go backwards in time. Some form of input
         * filter must guarantee this.
         */
        assertThrows(
            IllegalArgumentException.class,
            () -> maker.accept(badInputPoint)
        );
    }