TemplateHandler { public int getTemplateCount() { return templates.size(); } TemplateHandler(IChemObjectBuilder builder);  TemplateHandler(); void loadTemplates(IChemObjectBuilder builder); void addMolecule(IAtomContainer molecule); IAtomContainer removeMolecule(IAtomContainer molecule); boolean mapTemplateExact(IAtomContainer molecule); boolean mapTemplates(IAtomContainer molecule); int getTemplateCount(); IAtomContainer getTemplateAt(int position); IAtomContainerSet getMappedSubstructures(IAtomContainer molecule); static TemplateHandler createSingleton(IAtomContainer template); static TemplateHandler createFromSubstructure(Pattern ptrn, Iterable<IAtomContainer> mols); static TemplateHandler createFromSubstructure(Pattern ptrn, IAtomContainer mol);  }
@Test public void testInit() throws Exception { TemplateHandler th = new TemplateHandler(DefaultChemObjectBuilder.getInstance()); Assert.assertEquals(5, th.getTemplateCount()); }