@Test
public void testDifferentIsotopes() throws Exception {

    IsotopeFactory ifac = Isotopes.getInstance();
    IIsotope c = ifac.getMajorIsotope("C");
    IIsotope[] carbons = ifac.getIsotopes("C");
    IIsotope c13 = carbons[5]; // 13
    IIsotope h = ifac.getMajorIsotope("H");
    MolecularFormulaRange mfRange = new MolecularFormulaRange();
    mfRange.addIsotope(c, 0, 11);
    mfRange.addIsotope(c13, 0, 10);
    mfRange.addIsotope(h, 0, 10);
    double minMass = 54.04193 - 0.001;
    double maxMass = 54.04193 + 0.001;
    MolecularFormulaGenerator gen = new MolecularFormulaGenerator(builder,
            minMass, maxMass, mfRange);
    IMolecularFormulaSet mfSet = gen.getAllFormulas();
    Assert.assertNotNull(mfSet);
    Assert.assertEquals(1, mfSet.size());
    IMolecularFormula trueFormula = new MolecularFormula(); // C3CH5
    trueFormula.addIsotope(c, 3);
    trueFormula.addIsotope(c13, 1);
    trueFormula.addIsotope(h, 5);
    Assert.assertEquals(trueFormula.getIsotopeCount(), mfSet
            .getMolecularFormula(0).getIsotopeCount());
    Assert.assertEquals(trueFormula.getIsotopeCount(c), mfSet
            .getMolecularFormula(0).getIsotopeCount(c));
    Assert.assertEquals(trueFormula.getIsotopeCount(c13), mfSet
            .getMolecularFormula(0).getIsotopeCount(c13));
}