### Question:
ChemicalFilters extends BaseFilter { public synchronized void sortResultsByEnergies() throws CDKException { Map<Integer, AtomAtomMapping> allEnergyAtomMCS = Collections.synchronizedSortedMap(new TreeMap<>()); Map<Integer, Double> stereoScoreMap = Collections.synchronizedSortedMap(new TreeMap<>()); Map<Integer, Integer> fragmentScoreMap = Collections.synchronizedSortedMap(new TreeMap<>()); Map<Integer, Double> energySelectionMap = Collections.synchronizedSortedMap(new TreeMap<>()); initializeMaps(allEnergyAtomMCS, stereoScoreMap, fragmentScoreMap, energySelectionMap); double lowestEnergyScore = energyFilter.sortResults(allEnergyAtomMCS, energySelectionMap); clear(); int counter = 0; for (Map.Entry<Integer, Double> map : energySelectionMap.entrySet()) { if (lowestEnergyScore == map.getValue()) { addSolution(counter, map.getKey(), allEnergyAtomMCS, stereoScoreMap, energySelectionMap, fragmentScoreMap); counter++; } } if (lowestEnergyScore != EnergyFilter.MAX_ENERGY) { clear(allEnergyAtomMCS, stereoScoreMap, fragmentScoreMap, energySelectionMap); } } ChemicalFilters(
            IAtomContainer sourceMol,
            IAtomContainer targetMol);  ChemicalFilters(
            IQueryAtomContainer sourceMol,
            IAtomContainer targetMol); synchronized void sortResultsByEnergies(); synchronized void sortResultsByFragments(); synchronized void sortResultsByStereoAndBondMatch(); synchronized List<Double> getSortedEnergy(); synchronized List<Integer> getSortedFragment(); synchronized List<Double> getStereoMatches();  }### Answer:
@Test public void testSortResultsByEnergies() throws Exception { SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer target = sp.parseSmiles("C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\\C=C\\C=C/C"); IAtomContainer queryac = sp.parseSmiles("Nc1ccccc1"); Isomorphism smsd = new Isomorphism(queryac, target, Algorithm.DEFAULT, true, false, false); smsd.setChemFilters(false, false, false); assertEquals(4, smsd.getAllAtomMapping().size()); Isomorphism smsd1 = new Isomorphism(queryac, target, Algorithm.DEFAULT, true, false, false); smsd1.setChemFilters(false, false, true); assertEquals(2, smsd1.getAllAtomMapping().size()); }