def METHOD_NAME(self):
    child = pybamm.Symbol("sym", domain=["negative electrode"])
    symbol = pybamm.BoundaryGradient(child, "left")
    mesh = get_mesh_for_testing()
    spatial_method = pybamm.SpatialMethod()
    spatial_method.build(mesh)
    with self.assertRaisesRegex(TypeError, "Cannot process BoundaryGradient"):
        spatial_method.boundary_value_or_flux(symbol, child)
    # test also symbol "right"
    symbol = pybamm.BoundaryGradient(child, "right")
    with self.assertRaisesRegex(TypeError, "Cannot process BoundaryGradient"):
        spatial_method.boundary_value_or_flux(symbol, child)
    mesh = get_1p1d_mesh_for_testing()
    spatial_method = pybamm.SpatialMethod()
    spatial_method.build(mesh)
    child = pybamm.Symbol(
        "sym",
        domain=["negative electrode"],
        auxiliary_domains={"secondary": "current collector"},
    )
    symbol = pybamm.BoundaryGradient(child, "left")
    with self.assertRaisesRegex(NotImplementedError, "Cannot process 2D symbol"):
        spatial_method.boundary_value_or_flux(symbol, child)