IsotopePatternRule implements IRule { @Override public Object[] getParameters() { Object[] params = new Object[2]; if (pattern == null) params[0] = null; else { List<double[]> params0 = new ArrayList<double[]>(); for (IsotopeContainer isotope : pattern.getIsotopes()) { params0.add(new double[] { isotope.getMass(), isotope.getIntensity() }); } params[0] = params0; } params[1] = toleranceMass; return params; } IsotopePatternRule(); @Override void setParameters(Object[] params); @Override Object[] getParameters(); @Override double validate(IMolecularFormula formula);  }
@Test public void testDefault() throws Exception { IRule rule = new IsotopePatternRule(); Object[] objects = rule.getParameters(); Assert.assertNull(objects[0]); }