1 package club.wpia.gigi;
3 import static org.junit.Assert.*;
6 import org.xbill.DNS.Name;
7 import org.xbill.DNS.NameTooLongException;
8 import org.xbill.DNS.TextParseException;
10 public class TestJavaDNSSanity {
13 * Simple testcase from the dnsjava examples.
16 public void testJavaDNSSanity() throws TextParseException, NameTooLongException {
17 Name n = Name.fromString("www.dnsjava.org");
18 Name o = Name.fromString("dnsjava.org");
20 assertTrue(n.subdomain(o));
21 Name rel = n.relativize(o);
22 Name n2 = Name.concatenate(rel, o);