Frequency implements Comparable<Frequency> { public void setParent(IHasID parent){ this.parent = parent; this.parentId = parent.getId(); }  void setCorpus(String corpus); String getCorpus(); void setFrequency(Integer frequency); Integer getFrequency(); void setGenerator(String generator); String getGenerator(); void setParent(IHasID parent); IHasID getParent(); void setParentId(String parentId); String getParentId(); String toString(); @Override int compareTo(Frequency o); int hashCode(); boolean equals(Object o);  }
@SuppressWarnings("deprecation") @Test public void testSetParent(){ String id = "test_id"; Sense sense = new Sense(id); frequency.setParent(sense); assertEquals(sense, frequency.getParent()); assertEquals(sense.getId(), frequency.getParentId()); }