Added test cases and done changes to telnetUtil