PharmacophoreQuery extends QueryAtomContainer { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("PharmacophoreQuery(").append(this.hashCode()).append(", "); stringBuilder.append("#A:").append(getAtomCount()).append(", "); stringBuilder.append("#EC:").append(getElectronContainerCount()).append(", "); for (IAtom atom : atoms()) { PharmacophoreQueryAtom qatom = (PharmacophoreQueryAtom) atom; stringBuilder.append(qatom.getSymbol()).append(", "); } for (IBond bond : bonds()) { stringBuilder.append(bond.toString()).append(", "); } stringBuilder.append(')'); return stringBuilder.toString(); } PharmacophoreQuery(); @Override String toString();  }
@Test public void testToString() { String repr = query.toString(); Assert.assertTrue(repr .indexOf(" #A:3, #EC:3, D, A, A, DC::D [[OX1]]::A [[N]]::[4.0 - 4.5] , DC::D [[OX1]]::A [[N]]::[4.0 - 5.0] , DC::A [[N]]::A [[N]]::[5.4 - 5.8] , )") > 0); }