Add tests for ping method.