class BuilderUtils {

    public static InetSocketAddress toResolvedInetSocketAddress(final HostAndPort resolvedAddress) {
        try {
            return new InetSocketAddress(getByAddress(createByteArrayFromIpAddressString(
                    resolvedAddress.hostName())), resolvedAddress.port());
        } catch (UnknownHostException e) {
            throw new IllegalArgumentException("Invalid resolved address: " + resolvedAddress.hostName() +
                    ", expected IP-address.", e);
        }
    }

    private  BuilderUtils();

}