def test_get_declaration(integration_tool):
  """Tests the generation of the function declaration."""
  declaration = integration_tool._get_declaration()

  assert isinstance(declaration, FunctionDeclaration)
  assert declaration.name == "test_integration_tool"
  assert declaration.description == "Test integration tool description."

  # Check parameters schema
  params = declaration.parameters
  assert isinstance(params, Schema)
  print(f"params: {params}")
  assert params.type == Type.OBJECT

  # Check properties (excluded fields should not be present)
  assert "user_id" in params.properties
  assert "connection_name" not in params.properties
  assert "host" not in params.properties
  assert "service_name" not in params.properties
  assert "entity" not in params.properties
  assert "operation" not in params.properties
  assert "action" not in params.properties
  assert "page_size" in params.properties
  assert "filter" in params.properties

  # Check required fields (optional and excluded fields should not be required)
  assert "user_id" in params.required
  assert "page_size" not in params.required
  assert "filter" not in params.required
  assert "connection_name" not in params.required
Tests the generation of the function declaration.
tests/unittests/tools/application_integration_tool/test_integration_connector_tool.py