AthenzDomain { public AthenzDomain getParent() { return new AthenzDomain(name.substring(0, lastDot())); } @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 parent_domain_is_without_name_suffix() { assertEquals(new AthenzDomain("home.john"), new AthenzDomain("home.john.myapp").getParent()); }