package com.gu.conf;

import org.junit.Test;

import java.io.IOException;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.notNullValue;

public class LocalHostResolverTest {

	LocalHostResolver resolver = new LocalHostResolver();

    @Test
	public void shouldNotGetEmptyDomain() throws IOException {
		assertThat(resolver.getLocalHostDomain(), notNullValue());
	}

    @Test
	public void shouldNotGetLocalHostForDomain() throws IOException {
		assertThat(resolver.getLocalHostDomain(), not("localhost"));
	}

    @Test
	public void shouldGetDomainWithAtLeastOneDot() throws IOException {
		assertThat(resolver.getLocalHostDomain().contains("."), is(true));
	}
}

@@ -618,32 +618,34 @@
 calhost%22));%0A%09%7D%0A%0A
+//
     @Test%0A%09publi
@@ -630,32 +630,34 @@
 %09%7D%0A%0A//    @Test%0A
+//
 %09public void sho
@@ -701,32 +701,34 @@
 s IOException %7B%0A
+//
 %09%09assertThat(res
@@ -780,13 +780,15 @@
 true));%0A
+//
 %09%7D%0A%7D%0A

Remove broken test for now.