using unittest, refactored test harness code out to lib