def METHOD_NAME(self):
    def constant_voltage(variables):
        V = variables["Voltage [V]"]
        return V - 4.08
    # load models
    models = [
        pybamm.lithium_ion.SPM({"operating mode": "voltage"}),
        pybamm.lithium_ion.SPM({"operating mode": constant_voltage}),
    ]
    # load parameter values and process models and geometry
    params = [model.default_parameter_values for model in models]
    # First model: 4.08V charge
    params[0].update({"Voltage function [V]": 4.08}, check_already_exists=False)
    # set parameters and discretise models
    var_pts = {"x_n": 5, "x_s": 5, "x_p": 30, "r_n": 10, "r_p": 10}
    for i, model in enumerate(models):
        # create geometry
        geometry = model.default_geometry
        params[i].process_model(model)
        params[i].process_geometry(geometry)
        mesh = pybamm.Mesh(geometry, model.default_submesh_types, var_pts)
        disc = pybamm.Discretisation(mesh, model.default_spatial_methods)
        disc.process_model(model)
    # solve model
    solutions = [None] * len(models)
    t_eval = np.linspace(0, 3600, 100)
    for i, model in enumerate(models):
        solutions[i] = model.default_solver.solve(model, t_eval)
    V0 = solutions[0]["Voltage [V]"].entries
    V1 = solutions[1]["Voltage [V]"].entries
    np.testing.assert_array_almost_equal(V0, V1)
    I0 = solutions[0]["Current [A]"].entries
    I1 = solutions[1]["Current [A]"].entries
    np.testing.assert_array_almost_equal(abs((I1 - I0) / I0), 0, decimal=1)