Implemented ping() method and test methods for ping and basic connectivity