Move capturing print stream and rule to testing module. Remove old capturing print stream.
Implement capturing rule.