@Test
public void testRemove_2() {

    IMolecularFormula formulaMin = new MolecularFormula();
    formulaMin.addIsotope(builder.newInstance(IIsotope.class, "C"), 1);
    formulaMin.addIsotope(builder.newInstance(IIsotope.class, "H"), 1);
    formulaMin.addIsotope(builder.newInstance(IIsotope.class, "N"), 1);
    IMolecularFormula formulaMax = new MolecularFormula();
    formulaMax.addIsotope(builder.newInstance(IIsotope.class, "C"), 4);
    formulaMax.addIsotope(builder.newInstance(IIsotope.class, "H"), 12);
    formulaMax.addIsotope(builder.newInstance(IIsotope.class, "N"), 2);
    IMolecularFormula mf1 = new MolecularFormula();
    mf1.addIsotope(builder.newInstance(IIsotope.class, "C"), 3);
    mf1.addIsotope(builder.newInstance(IIsotope.class, "H"), 10);
    mf1.addIsotope(builder.newInstance(IIsotope.class, "N"), 1);
    IMolecularFormula mf2 = new MolecularFormula();
    mf2.addIsotope(builder.newInstance(IIsotope.class, "C"), 1);
    mf2.addIsotope(builder.newInstance(IIsotope.class, "H"), 1);
    IMolecularFormulaSet formulaSet = new MolecularFormulaSet();
    formulaSet.addMolecularFormula(mf1);
    formulaSet.addMolecularFormula(mf2);
    IMolecularFormulaSet newMFSet = MolecularFormulaSetManipulator.remove(formulaSet, formulaMin, formulaMax);
    /* the mf2 is excluded from the limits. It doesn't contain N */
    Assert.assertEquals(1, newMFSet.size());
    Assert.assertEquals(MolecularFormulaManipulator.getString(mf1),
            MolecularFormulaManipulator.getString(newMFSet.getMolecularFormula(0)));
}