@Override
    public void accept(TrackPair trackPair) {
        checkNotNull(trackPair);

        ArrayList<AirborneEvent> detectedEvents = airborneAlgorithm.findAirborneEvents(trackPair);

        detectedEvents.forEach(statCollector);

        for (AirborneEvent detectedEvent : detectedEvents) {
            outputMechanism.accept(detectedEvent);
        }
    }
@Test
    public void endToEndProcessing() {

        AirborneAria tpp = airborneAria(new AirborneAlgorithmDef());

        //catch AirborneEvent generated when the airborne algorithm processes data
        ConsumingCollections.ConsumingArrayList<AirborneEvent> eventCatcher = newConsumingArrayList();

        //Create the actual TrackPair processing mechanism
        AirbornePairConsumer airborneAria = new AirbornePairConsumer(
            tpp,
            eventCatcher
        );

        //analyze this track
        airborneAria.accept(scaryTrackPair());

        //confirm exactly one event was found
        assertThat(eventCatcher, hasSize(1));

        AirborneEvent result = eventCatcher.get(0);

        //this is a scary event, it should have a low score
        assertThat(result.score(), lessThan(5.0));
    }