def METHOD_NAME(self):
    cube = iris.cube.Cube(np.ma.MaskedArray([1.0, 2.0, 3.0, 1.0, 2.0, 3.0],
                                            mask=[0, 0, 0, 1, 1, 1],
                                            fill_value=np.nan))
    grib_message = mock.sentinel.GRIB_MESSAGE
    with mock.patch(GRIB_API) as grib_api:
        data_section(cube, grib_message)
    # Check the use of a mask has been turned on and a suitable fill
    # value has been chosen.
    FILL = self.assertBitmapRange(grib_api, 1, 3)
    # Check the correct data values have been set.
    self.assertValues(grib_api, [1, 2, 3, FILL, FILL, FILL])