Using more mocking
Tweaked all tests to reduce creation of MessageRegistry instances.
Digging around for resource leak
Now closing connections to avoid massive memory leaks
Improving accuracy of test
More minor tweaking.
More tweaking
Yet more tweaking.