@Test
public void testRemove_1() {

    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);
    mf2.addIsotope(builder.newInstance(IIsotope.class, "N"), 1);
    IMolecularFormula mf3 = new MolecularFormula();
    mf3.addIsotope(builder.newInstance(IIsotope.class, "C"), 4);
    mf3.addIsotope(builder.newInstance(IIsotope.class, "H"), 12);
    mf3.addIsotope(builder.newInstance(IIsotope.class, "N"), 2);
    IMolecularFormula mf4 = new MolecularFormula();
    mf4.addIsotope(builder.newInstance(IIsotope.class, "C"), 7);
    mf4.addIsotope(builder.newInstance(IIsotope.class, "H"), 10);
    mf4.addIsotope(builder.newInstance(IIsotope.class, "N"), 1);
    IMolecularFormulaSet formulaSet = new MolecularFormulaSet();
    formulaSet.addMolecularFormula(mf1);
    formulaSet.addMolecularFormula(mf2);
    formulaSet.addMolecularFormula(mf3);
    formulaSet.addMolecularFormula(mf4);
    IMolecularFormulaSet newMFSet = MolecularFormulaSetManipulator.remove(formulaSet, formulaMin, formulaMax);
    /* the mf4 is excluded from the limits */
    Assert.assertEquals(3, newMFSet.size());
    Assert.assertEquals(MolecularFormulaManipulator.getString(mf1),
            MolecularFormulaManipulator.getString(newMFSet.getMolecularFormula(0)));
    Assert.assertEquals(MolecularFormulaManipulator.getString(mf2),
            MolecularFormulaManipulator.getString(newMFSet.getMolecularFormula(1)));
    Assert.assertEquals(MolecularFormulaManipulator.getString(mf3),
            MolecularFormulaManipulator.getString(newMFSet.getMolecularFormula(2)));
}