public OutputStream clearTee() {
        OutputStream tee = this.tee.getAndSet(null);
        if (tee == null) throw new IllegalStateException("tee not set");
        return tee;
    }
Used to replace System.out and System.err, providing the ability to forward output to an additional sink.

@author jonmv
vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/TeeStream.java