@Test
public void testIsValid_True_2Rules() {

    IMolecularFormula formula = new MolecularFormula();
    formula.addIsotope(ifac.getMajorIsotope("C"), 1);
    formula.addIsotope(ifac.getMajorIsotope("H"), 4);
    formula.setCharge(0);
    List<IRule> rules = new ArrayList<IRule>();
    rules.add(new MMElementRule());
    rules.add(new ChargeRule());
    MolecularFormulaChecker MFChecker = new MolecularFormulaChecker(rules);
    IMolecularFormula formulaWith = MFChecker.isValid(formula);
    Assert.assertEquals(1.0, formulaWith.getProperty((new MMElementRule()).getClass()), 0.01);
    Assert.assertEquals(1.0, formulaWith.getProperty((new ChargeRule()).getClass()), 0.01);
}