ChargeRule implements IRule { @Override public Object[] getParameters() { Object[] params = new Object[1]; params[0] = charge; return params; } ChargeRule(); @Override void setParameters(Object[] params); @Override Object[] getParameters(); @Override double validate(IMolecularFormula formula);  }
@Test public void testDefault() throws ClassNotFoundException, CDKException, Exception { IRule rule = new ChargeRule(); Object[] objects = rule.getParameters(); Assert.assertEquals(1, objects.length); double charge = (Double) objects[0]; Assert.assertEquals(0.0, charge, 0.00001); }