def METHOD_NAME(self):
    # Check that the function being passed through gets called with
    # numpy.vectorize, before being applied to the points array.
    # The reason we use numpy.vectorize is to support multi-dimensional
    # coordinate points.
    def fn(coord, v):
        return v**2
    with mock.patch(
        "numpy.vectorize", return_value=self.vectorised
    ) as vectorise_patch:
        with mock.patch("iris.coords.AuxCoord") as aux_coord_constructor:
            add_categorised_coord(
                self.cube, "foobar", self.coord, fn, units=self.units
            )
    # Check the constructor of AuxCoord gets called with the
    # appropriate arguments.
    # Start with the vectorised function.
    vectorise_patch.assert_called_once_with(fn)
    # Check the vectorize wrapper gets called with the appropriate args.
    self.vectorised.assert_called_once_with(self.coord, self.coord.points)
    # Check the AuxCoord constructor itself.
    aux_coord_constructor.assert_called_once_with(
        self.vectorised(self.coord, self.coord.points),
        units=self.units,
        attributes=self.coord.attributes.copy(),
    )
    # And check adding the aux coord to the cube mock.
    self.cube.add_aux_coord.assert_called_once_with(
        aux_coord_constructor(), self.cube.coord_dims(self.coord)
    )