// Path: src/main/java/cz/tomasdvorak/eet/client/dto/DnsResolver.java
// public interface DnsResolver {
// 
//     /**
//      * Convert a domain name to IP address.
//      *
//      * @param hostname Pure hostname, without protocol or path. For example pg.eet.cz
//      * @return IP address as a String
//      * @throws UnknownHostException in case DNS lookup fails.
//      */
//     String getHostAddress(String hostname) throws UnknownHostException;
// }


import cz.tomasdvorak.eet.client.config.EndpointType;
import cz.tomasdvorak.eet.client.dto.DnsResolver;
import cz.tomasdvorak.eet.client.exceptions.DnsLookupFailedException;
import cz.tomasdvorak.eet.client.exceptions.DnsTimeoutException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.net.MalformedURLException;
import java.net.UnknownHostException;
import java.util.concurrent.TimeoutException;
package cz.tomasdvorak.eet.client.networking;



public class DnsLookupWithTimeoutTest {

    private DnsLookup resolver;

    @Before
    public void setUp() throws Exception {

// Path: src/main/java/cz/tomasdvorak/eet/client/dto/DnsResolver.java
// public interface DnsResolver {
// 
//     /**
//      * Convert a domain name to IP address.
//      *
//      * @param hostname Pure hostname, without protocol or path. For example pg.eet.cz
//      * @return IP address as a String
//      * @throws UnknownHostException in case DNS lookup fails.
//      */
//     String getHostAddress(String hostname) throws UnknownHostException;
// }


// Path: src/test/java/cz/tomasdvorak/eet/client/networking/DnsLookupWithTimeoutTest.java
import cz.tomasdvorak.eet.client.config.EndpointType;
import cz.tomasdvorak.eet.client.dto.DnsResolver;
import cz.tomasdvorak.eet.client.exceptions.DnsLookupFailedException;
import cz.tomasdvorak.eet.client.exceptions.DnsTimeoutException;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.net.MalformedURLException;
import java.net.UnknownHostException;
import java.util.concurrent.TimeoutException;

package cz.tomasdvorak.eet.client.networking;



public class DnsLookupWithTimeoutTest {

    private DnsLookup resolver;

    @Before
    public void setUp() throws Exception {

        final DnsResolver resolverImpl = new DnsResolver() {