@Test
public void testGeneratorSavesState() {

    IsotopePatternGenerator isogen = new IsotopePatternGenerator(.1);
    IMolecularFormula mf1 = MolecularFormulaManipulator.getMolecularFormula("C6H12O6", builder);
    IsotopePattern ip1 = isogen.getIsotopes(mf1);
    Assert.assertEquals(1, ip1.getNumberOfIsotopes());
    IMolecularFormula mf2 = MolecularFormulaManipulator.getMolecularFormula("C6H12O6", builder);
    IsotopePattern ip2 = isogen.getIsotopes(mf2);
    Assert.assertEquals(1, ip2.getNumberOfIsotopes());
}