Avoid missleading junit cleanup failures, if tests are aborted.

This will also delete some trailing space, let me know if you want to not have that in a PR.

I was debugging some test failures, and the additional failures of the @After method confused me a bit. This way the NPE is avoided if the failure is before a server could be instantiated (for example port conflict).