def METHOD_NAME(constrained, mol):
    """Minimal regression test comparing molecule energies to energies computed
    by version 0.8.0 of the toolkit"""
    # TODO: Also test periodic vs. vacuum
    with open(
        get_data_file_path("reference_energies/reference_after_1007.json"), "r"
    ) as fi:
        reference = json.loads(fi.read())
    name = mol + "_"
    if not constrained:
        name += "un"
    name += "constrained"
    reference_energy = reference[name]
    omm_sys, positions, off_top = _build_system(
        mol=mol,
        constrained=constrained,
    )
    simulation = _build_simulation(omm_sys=omm_sys, off_top=off_top)
    derived_energy = _get_energy(simulation=simulation, positions=positions)
    np.testing.assert_almost_equal(
        actual=derived_energy.value_in_unit(openmm_unit.kilojoule_per_mole),
        desired=reference_energy,
        decimal=5,
    )