@Test public void noNullPointerExceptionForExactMassOfRGroups() throws Exception {

    IMolecularFormula formula = new MolecularFormula();
    formula.addIsotope(new Isotope("C"));
    formula.addIsotope(new Isotope("H"), 3);
    formula.addIsotope(new Isotope("R"));
    assertThat(MolecularFormulaManipulator.getTotalExactMass(formula),
               closeTo(15.0234, 0.01));
}