MMElementRule implements IRule { @Override public Object[] getParameters() { Object[] params = new Object[2]; params[0] = databaseUsed; params[1] = rangeMassUsed; return params; } MMElementRule(); @Override void setParameters(Object[] params); @Override Object[] getParameters(); @Override double validate(IMolecularFormula formula);  }
@Test public void testDefault() throws Exception { IRule rule = new MMElementRule(); Object[] objects = rule.getParameters(); Assert.assertSame(MMElementRule.Database.WILEY, objects[0]); Assert.assertSame(MMElementRule.RangeMass.Minus500, objects[1]); }