Port patches from the Invoca/web repository to TestUnit