SingleMappingHandler extends AbstractMCSAlgorithm implements IMCSBase { @Override public Map<Integer, Integer> getFirstMapping() { return Collections.unmodifiableMap(firstMCS); } SingleMappingHandler(boolean removeH); @Override void set(MolHandler source, MolHandler target); @Override void set(IQueryAtomContainer source, IAtomContainer target); @Override void searchMCS(boolean bondTypeMatch); @Override List<Map<Integer, Integer>> getAllMapping(); @Override Map<Integer, Integer> getFirstMapping(); @Override List<Map<IAtom, IAtom>> getAllAtomMapping(); @Override Map<IAtom, IAtom> getFirstAtomMapping();  }
@Test public void testGetFirstMapping() { IAtom atomSource = new Atom("R"); IAtom atomTarget = new Atom("R"); IAtomContainer source = new AtomContainer(); source.addAtom(atomSource); IAtomContainer target = new AtomContainer(); target.addAtom(atomTarget); boolean removeHydrogen = false; SingleMappingHandler instance = new SingleMappingHandler(removeHydrogen); MolHandler mol1 = new MolHandler(source, true, true); MolHandler mol2 = new MolHandler(target, true, true); instance.set(mol1, mol2); instance.searchMCS(true); assertNotNull(instance.getFirstMapping()); }