PharmacophoreQueryBond extends Bond implements IQueryBond { @Override public String toString() { StringBuffer sb = new StringBuffer(); sb.append("DC::" + getAtom(0) + "::" + getAtom(1) + "::[" + getLower() + " - " + getUpper() + "] "); return sb.toString(); } PharmacophoreQueryBond();  PharmacophoreQueryBond(PharmacophoreQueryAtom atom1, PharmacophoreQueryAtom atom2, double lower, double upper);  PharmacophoreQueryBond(PharmacophoreQueryAtom atom1, PharmacophoreQueryAtom atom2, double distance); @Override boolean matches(IBond bond); double getUpper(); double getLower(); @Override String toString();  }
@Test public void testToString() { PharmacophoreQueryAtom qatom1 = new PharmacophoreQueryAtom("Amine", "[CX2]N"); PharmacophoreQueryAtom qatom2 = new PharmacophoreQueryAtom("aromatic", "c1ccccc1"); PharmacophoreQueryBond qbond1 = new PharmacophoreQueryBond(qatom1, qatom2, 1.0, 2.0); String repr = qbond1.toString(); Assert.assertEquals(repr, "DC::Amine [[CX2]N]::aromatic [c1ccccc1]::[1.0 - 2.0] "); }