public class TestUtils
extends java.lang.Object
| Constructor and Description |
|---|
TestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
encodePercent(java.lang.String strToEncode)
Percent-encode all occurrence of the the percent sign (%) in the given string.
|
static java.util.List<java.net.Inet6Address> |
getIpv6List()
Get all IPv6 addresses defined in local network adapters.
|
static java.util.List<java.net.Inet6Address> |
getIpv6List(java.lang.String hostname)
Get all IPv6 addresses of the given host.
|
static boolean |
serverListening(java.net.InetAddress addr,
int port)
Checks if there is a server socket listening in the given address and port.
|
static boolean |
serverListening(java.lang.String hostName,
int port)
Checks if there is a server socket listening in the given host and port.
|
public static java.lang.String encodePercent(java.lang.String strToEncode)
strToEncode - the string to encodepublic static java.util.List<java.net.Inet6Address> getIpv6List()
Inet6Addressspublic static java.util.List<java.net.Inet6Address> getIpv6List(java.lang.String hostname)
Inet6Addressspublic static boolean serverListening(java.lang.String hostName,
int port)
hostName - the host where to look for the server socketport - the expected port the server is listeningpublic static boolean serverListening(java.net.InetAddress addr,
int port)
addr - the address where to look for the server socketport - the expected port the server is listening