createAndRegister() does already register the listener.
removed duplication.
improved readability, moved noisy context handling to methods.
more readability, moved functional test base url cleanup to method.
more readability, moved waiting for server to method.
simplified code.
Merge pull request #483 from hauner/functional-refactoring

Functional refactoring