ReactionEngine { public IParameterReact getParameterClass(Class<?> paramClass) { for (Iterator<IParameterReact> it = paramsMap2.iterator(); it.hasNext();) { IParameterReact ipr = it.next(); if (ipr.getClass().equals(paramClass)) return ipr; } return null; } ReactionEngine(); void setParameterList(List<IParameterReact> params); List<IParameterReact> getParameterList(); IParameterReact getParameterClass(Class<?> paramClass); public HashMap<String, Object> paramsMap; public IReactionMechanism mechanism; public List<IParameterReact> paramsMap2; }
@Test public void testGetParameterClass_Class() throws Exception { ReactionEngine engine = new AdductionProtonLPReaction(); Assert.assertNotNull(engine.getParameterClass(SetReactionCenter.class)); }