code: def testBigQueryToElwc(self, mock_client):
      # Mock query result schema for _BigQueryElwcConverter.
      mock_client.return_value.query.return_value.result.return_value.schema = (
          self._schema
      )
      elwc_config = elwc_config_pb2.ElwcConfig(
          context_feature_fields=[
              "context_feature_1",
              "context_feature_2",
          ]
      )
      packed_custom_config = example_gen_pb2.CustomConfig()
      packed_custom_config.custom_config.Pack(elwc_config)
      with beam.Pipeline() as pipeline:
          elwc_examples = (
              pipeline
              | "ToElwcBytes"
              >> executor._BigQueryToElwc(
                  exec_properties={
                      "_beam_pipeline_args": [],
                      "custom_config": json_format.MessageToJson(
                          packed_custom_config,
                          preserving_proto_field_name=True,
                      ),
                  },
                  split_pattern="SELECT context_feature_1, context_feature_2, "
                  "feature_id_1, feature_id_2, feature_id_3 FROM `fake`",
              )
              | "LoadElwc" >> beam.Map(_DeserializeElwc)
          )
  
          expected_elwc_examples = [
              _ELWC_1,
              _ELWC_2,
              _ELWC_3,
              _ELWC_4,
              _ELWC_5,
          ]
          util.assert_that(
              elwc_examples, util.equal_to(expected_elwc_examples)
          )
  
file_path: tfx/tfx/extensions/google_cloud_big_query/experimental/elwc_example_gen/component/executor_test.py
imports: from unittest import mock
  import apache_beam
  from apache_beam.testing import util
  from google.cloud import bigquery
  import tensorflow
  from tfx.extensions.google_cloud_big_query import utils
  from tfx.extensions.google_cloud_big_query.experimental.elwc_example_gen.component import executor
  from tfx.extensions.google_cloud_big_query.experimental.elwc_example_gen.proto import elwc_config_pb2
  from tfx.proto import example_gen_pb2
  from google.protobuf import json_format
  from google.protobuf import text_format
  from tensorflow_serving.apis import input_pb2
label_desc: Use image node_id 2 for calling the ExecutorTest obj's underlying member method code with example usage: obj.testBigQueryToElwc(mock_client) without return types