def METHOD_NAME(self, mock_get_template_data):
    mock_get_template_data.return_value = {
        "Resources": {},
        "Parameters": {
            "Param1": {"Type": "String", "Default": "foo"},
        },
        "OtherMapping": {},
        "OtherKey": "other",
    }
    plugin = CfnIacImplementation(self.sam_cli_context)
    plugin._build_resources_section = Mock()
    with self.assertRaises(InvalidSamDocumentException) as ctx:
        plugin._build_stack("/path/to/template", False, "test_stack")
    self.assertIn("'Resources' section is required", str(ctx.exception))