code: def test_validate_should_fail_for_set_allow_empty_when_field_is_none(
      self,
  ):
      specification = [dict(name="name", allow_empty=True)]
      body = {"name": None}
  
      validator = GcpBodyFieldValidator(specification, "v1")
  
      with pytest.raises(GcpFieldValidationException):
          validator.validate(body)
  
imports: from __future__ import annotations
  import pytest
  from airflow.providers.google.cloud.utils.field_validator import GcpBodyFieldValidator, GcpFieldValidationException, GcpValidationSpecificationException
label_desc: Use image node_id 8 for calling the TestGcpBodyFieldValidator obj's underlying member method code with example usage: obj.test_validate_should_fail_for_set_allow_empty_when_field_is_none() without return types