Factor out TestSet into separate module and make unwrap more powerful.