ping handler: minor test refactoring