Add some logic around the start TLS code for the unit tests.

Rather than be clever and make the unit tests cleverer, mangle the code
around what they expect to happen.