Fix Java 6 compatibility issue in test case

InetSocketAddress.getHostString() is Java 7 only, switching to .getHostName().
This may result in a PTR lookup, which shouldn't be a problem for a test case.