def METHOD_NAME(self):
    # When re-scaling masked data with a NaN fill value, ensure
    # a fill value is chosen which allows for the scaling, and any
    # filled values match the chosen fill value.
    cube = iris.cube.Cube(np.ma.MaskedArray([-1.0, 2.0, -1.0, 2.0],
                                            mask=[0, 0, 1, 1],
                                            fill_value=np.nan),
                          standard_name='geopotential_height', units='km')
    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, -1000, 2000)
    # Check the correct data values have been set.
    self.assertValues(grib_api, [-1000, 2000, FILL, FILL])