Simple ping test using Java