@Test
public void testGetDBE_IMolecularFormula() throws Exception {

    IMolecularFormula formula = new MolecularFormula();
    formula.addIsotope(builder.newInstance(IIsotope.class, "C"), 10);
    formula.addIsotope(builder.newInstance(IIsotope.class, "H"), 22);
    Assert.assertEquals(0.0, MolecularFormulaManipulator.getDBE(formula), 0.01);
    formula = new MolecularFormula();
    formula.addIsotope(builder.newInstance(IIsotope.class, "C"), 10);
    formula.addIsotope(builder.newInstance(IIsotope.class, "H"), 16);
    Assert.assertEquals(3.0, MolecularFormulaManipulator.getDBE(formula), 0.01);
    formula = new MolecularFormula();
    formula.addIsotope(builder.newInstance(IIsotope.class, "C"), 10);
    formula.addIsotope(builder.newInstance(IIsotope.class, "H"), 16);
    formula.addIsotope(builder.newInstance(IIsotope.class, "O"));
    Assert.assertEquals(3.0, MolecularFormulaManipulator.getDBE(formula), 0.01);
    formula = new MolecularFormula();
    formula.addIsotope(builder.newInstance(IIsotope.class, "C"), 10);
    formula.addIsotope(builder.newInstance(IIsotope.class, "H"), 19);
    formula.addIsotope(builder.newInstance(IIsotope.class, "N"));
    Assert.assertEquals(2.0, MolecularFormulaManipulator.getDBE(formula), 0.01);
}