### Question:
CDKRMapHandler { public synchronized void calculateOverlapsAndReduceExactMatch( IAtomContainer Molecule1, IAtomContainer Molecule2, boolean shouldMatchBonds, boolean shouldMatchRings, boolean matchAtomType) throws CDKException { setSource(Molecule1); setTarget(Molecule2); setMappings(new ArrayList<>()); if ((getSource().getAtomCount() == 1) || (getTarget().getAtomCount() == 1)) { List<CDKRMap> overlaps = CDKMCS.checkSingleAtomCases(getSource(), getTarget()); this.setTimeout(CDKMCS.isTimeout()); int nAtomsMatched = overlaps.size(); nAtomsMatched = (nAtomsMatched > 0) ? 1 : 0; if (nAtomsMatched > 0) { identifySingleAtomsMatchedParts(overlaps, getSource(), getTarget()); } } else { List<List<CDKRMap>> overlaps = CDKMCS.search(getSource(), getTarget(), new BitSet(), new BitSet(), true, true, shouldMatchBonds, shouldMatchRings, matchAtomType); this.setTimeout(CDKMCS.isTimeout()); List<List<CDKRMap>> reducedList = removeSubGraph(overlaps); Stack<List<CDKRMap>> allMaxOverlaps = getAllMaximum(reducedList); while (!allMaxOverlaps.empty()) { List<List<CDKRMap>> maxOverlapsAtoms = makeAtomsMapOfBondsMap(allMaxOverlaps.peek(), getSource(), getTarget()); identifyMatchedParts(maxOverlapsAtoms, getSource(), getTarget()); allMaxOverlaps.pop(); } } } CDKRMapHandler(); synchronized IAtomContainer getSource(); synchronized void setSource(IAtomContainer aSource); synchronized IAtomContainer getTarget(); synchronized void setTarget(IAtomContainer aTarget); synchronized List<Map<Integer, Integer>> calculateOverlapsAndReduce(IAtomContainer molecule1,
            IAtomContainer molecule2, boolean shouldMatchBonds, boolean shouldMatchRings, boolean matchAtomType); synchronized List<Map<Integer, Integer>> calculateOverlapsAndReduce(IAtomContainer molecule1,
            IQueryAtomContainer molecule2); synchronized void calculateOverlapsAndReduceExactMatch(
            IAtomContainer Molecule1,
            IAtomContainer Molecule2,
            boolean shouldMatchBonds,
            boolean shouldMatchRings,
            boolean matchAtomType); synchronized List<Map<Integer, Integer>> calculateSubGraphs(IAtomContainer Molecule1,
            IAtomContainer Molecule2,
            boolean shouldMatchBonds,
            boolean shouldMatchRings,
            boolean matchAtomType); synchronized List<Map<Integer, Integer>> calculateIsomorphs(IAtomContainer Molecule1,
            IAtomContainer Molecule2,
            boolean shouldMatchBonds,
            boolean shouldMatchRings,
            boolean matchAtomType); synchronized List<Map<Integer, Integer>> getMappings(); synchronized void setMappings(List<Map<Integer, Integer>> mappings); boolean isTimeout(); void setTimeout(boolean timeout);  }### Answer:
@Test public void testCalculateOverlapsAndReduceExactMatch() throws Exception { IChemObjectBuilder builder = DefaultChemObjectBuilder.getInstance(); SmilesParser sp = new SmilesParser(builder); IAtomContainer Molecule1 = sp.parseSmiles("O1C=CC=C1"); IAtomContainer Molecule2 = sp.parseSmiles("O1C=CC=C1"); CDKRMapHandler instance = new CDKRMapHandler(); instance.calculateOverlapsAndReduceExactMatch(Molecule1, Molecule2, true, false,false); Assert.assertNotNull(instance.getMappings()); }