Clean up unit JUnit tests by using @Rule

This was done for UDP only to introduce the concept of @Rule.  The same can be applied to all test servers.