HelloWorldTest: refactored to reduce duplication