AthenzDomain { public boolean isTopLevelDomain() { return !name.contains("."); } @JsonCreator  AthenzDomain(String name); @JsonValue String getName(); boolean isTopLevelDomain(); AthenzDomain getParent(); String getNameSuffix(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void domain_without_dot_is_toplevel() { assertTrue(new AthenzDomain("toplevel").isTopLevelDomain()); assertFalse(new AthenzDomain("not.toplevel").isTopLevelDomain()); }