@Override
    public Optional<TrackPair> clean(TrackPair trackPair) {
        requireNonNull(trackPair, "The input track pair is null");
        requireNonNull(trackPair.track1(), "trackPair.first() is null");
        requireNonNull(trackPair.track2(), "trackPair.second() is null");

        Optional<Track> smoothedFirst = trackSmoother.clean(trackPair.track1());
        Optional<Track> smoothedSecond = trackSmoother.clean(trackPair.track2());

        boolean bothPresent = (smoothedFirst.isPresent() && smoothedSecond.isPresent());

        return (bothPresent)
            ? Optional.of(TrackPair.of(smoothedFirst.get(), smoothedSecond.get()))
            : Optional.empty();
    }
@Test
    public void rejectingOneTrackProducesEmptyOptional() {

        Track<String> track1 = testTrack(15);
        Track<String> track2 = testTrack(5);

        TrackPairCleaner instance = new TrackPairCleaner(new SizeBasedCleaner(10));

        Optional<TrackPair> result = instance.clean(TrackPair.of(track1, track2));

        assertFalse(result.isPresent());
    }