HanserRingFinder implements RingFinder { @Override public Collection<List<IAtom>> findRings(IAtomContainer molecule) { if (molecule == null) return null; rings.clear(); PathGraph graph = new PathGraph(molecule); for (int i = 0; i < molecule.getAtomCount(); i++) { List<PathEdge> edges = graph.remove(molecule.getAtom(i)); for (PathEdge edge : edges) { List<IAtom> ring = edge.getAtoms(); rings.add(ring); } } return rings; } HanserRingFinder(); @Override Collection<List<IAtom>> findRings(IAtomContainer molecule); @Override IRingSet getRingSet(IAtomContainer molecule);  }
@Test public void testFindRings() { IAtomContainer molecule = null; HanserRingFinder instance = new HanserRingFinder(); Collection expResult = null; Collection result = instance.findRings(molecule); assertEquals(expResult, result); }