BasicParameter implements NetworkParameter, Comparable<BasicParameter> { @Override public boolean equals(Object o) { if (o instanceof BasicParameter) { BasicParameter other = (BasicParameter) o; return d_base.equals(other.d_base) && d_subj.equals(other.d_subj); } return false; } BasicParameter(Treatment base, Treatment subj); String getName(); Treatment getBaseline(); Treatment getSubject(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); int compareTo(BasicParameter other);  }
@Test public void testEquals() { Treatment t1 = new Treatment("A_1"); Treatment t2 = new Treatment("B52"); Treatment t3 = new Treatment("C"); assertEquals(new BasicParameter(t1, t2), new BasicParameter(t1, t2)); assertEquals(new BasicParameter(t1, t2).hashCode(), new BasicParameter(t1, t2).hashCode()); assertFalse(new BasicParameter(t1, t2).equals(new BasicParameter(t3, t2))); assertFalse(new BasicParameter(t1, t2).equals(new BasicParameter(t1, t3))); }