### Question:
DomainName { public DomainName(String domainName) throws IllegalArgumentException { setDomainName(domainName); } DomainName(String domainName); String getDomainName(); boolean setDomainName(String domainName); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testDomainName() throws Exception { DomainName d1 = new DomainName(""); assertTrue(d1 instanceof DomainName); DomainName d2 = new DomainName("localhost"); assertTrue(d2 instanceof DomainName); DomainName d3 = new DomainName("example.com"); assertTrue(d3 instanceof DomainName); }