### Question:
SingleMappingHandler implements IResults { @Override public synchronized AtomAtomMapping getFirstAtomMapping() { if (allAtomMCS.iterator().hasNext()) { return allAtomMCS.iterator().next(); } return new AtomAtomMapping(source, target); } SingleMappingHandler(
            IAtomContainer source, 
            IAtomContainer target, 
            boolean shouldMatchRings);  SingleMappingHandler(
            IQueryAtomContainer source, 
            IAtomContainer target); @Override synchronized List<AtomAtomMapping> getAllAtomMapping(); @Override synchronized AtomAtomMapping getFirstAtomMapping();  }### Answer:
@Test public void testSet_IAtomContainer_IAtomContainer() { IAtom atomSource = new Atom("R"); IAtom atomTarget = new Atom("R"); IAtomContainer source = new AtomContainer(); source.addAtom(atomSource); IAtomContainer target = new AtomContainer(); target.addAtom(atomTarget); SingleMappingHandler instance = new SingleMappingHandler(source, target, false); Assert.assertNotNull(instance.getFirstAtomMapping()); }
@Test public void testSet_IMolecule_IMolecule() throws Exception { IAtom atomSource = new Atom("R"); IAtom atomTarget = new Atom("R"); IAtomContainer source = new AtomContainer(); source.addAtom(atomSource); IAtomContainer target = new AtomContainer(); target.addAtom(atomTarget); SingleMappingHandler instance = new SingleMappingHandler(source, target, false); Assert.assertNotNull(instance.getFirstAtomMapping()); }
@Test public void testSet_AtomContainer_AtomContainer() { IAtom atomSource = new Atom("R"); IAtom atomTarget = new Atom("R"); IAtomContainer source = new AtomContainer(); source.addAtom(atomSource); IAtomContainer target = new AtomContainer(); target.addAtom(atomTarget); SingleMappingHandler instance = new SingleMappingHandler(source, target, false); Assert.assertNotNull(instance.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); SingleMappingHandler instance = new SingleMappingHandler(source, target, false); Assert.assertNotNull(instance.getFirstAtomMapping()); }
@Test public void testGetFirstAtomMapping() { IAtom atomSource = new Atom("R"); IAtom atomTarget = new Atom("R"); IAtomContainer source = new AtomContainer(); source.addAtom(atomSource); IAtomContainer target = new AtomContainer(); target.addAtom(atomTarget); SingleMappingHandler instance = new SingleMappingHandler(source, target, false); Assert.assertNotNull(instance.getFirstAtomMapping()); }