atiaomar1978-hub commented on code in PR #24844:
URL: https://github.com/apache/camel/pull/24844#discussion_r3741018013


##########
components/camel-apicurio-registry/src/test/java/org/apache/camel/component/apicurioregistry/ApicurioRegistryProducerTest.java:
##########
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.apicurioregistry;
+
+import java.io.ByteArrayInputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+
+import io.apicurio.registry.rest.client.RegistryClient;
+import io.apicurio.registry.rest.client.models.ArtifactMetaData;
+import io.apicurio.registry.rest.client.models.CreateArtifact;
+import io.apicurio.registry.rest.client.models.CreateArtifactResponse;
+import io.apicurio.registry.rest.client.models.CreateGroup;
+import io.apicurio.registry.rest.client.models.CreateVersion;
+import io.apicurio.registry.rest.client.models.GroupMetaData;
+import io.apicurio.registry.rest.client.models.VersionMetaData;
+import io.apicurio.registry.rest.client.models.VersionSearchResults;
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+class ApicurioRegistryProducerTest extends CamelTestSupport {
+
+    private final RegistryClient mockClient = mock(RegistryClient.class, 
org.mockito.Mockito.RETURNS_DEEP_STUBS);
+
+    @BindToRegistry("apicurio-registry")
+    public ApicurioRegistryComponent getComponent() {
+        ApicurioRegistryComponent component = new 
ApicurioRegistryComponent(context);
+        
component.getConfiguration().setRegistryUrl("http://localhost:8080/apis/registry/v3";);
+        return component;
+    }
+
+    @Override
+    protected RoutesBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                from("direct:createArtifact")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=createArtifact";);
+
+                from("direct:deleteArtifact")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=deleteArtifact";);
+
+                from("direct:getArtifactMetadata")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=getArtifactMetadata";);
+
+                from("direct:getArtifactContent")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=getArtifactContent";);
+
+                from("direct:listVersions")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=listVersions";);
+
+                from("direct:createGroup")
+                        
.to("apicurio-registry:newGroup?registryUrl=http://localhost:8080/apis/registry/v3&operation=createGroup";);
+
+                from("direct:updateArtifact")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=updateArtifact";);
+
+                from("direct:searchArtifacts")

Review Comment:
   **Bugbot (test coverage):** Route for `searchArtifacts` is wired in 
`createRouteBuilder()` but there is no `@Test` exercising it. Eight of ten 
producer ops have unit tests; `searchArtifacts`, `testCompatibility`, and 
`validate` are missing at unit level.
   
   _AI-generated Bugbot test-coverage comment on behalf of atiaomar1978-hub._



##########
components/camel-apicurio-registry/src/test/java/org/apache/camel/component/apicurioregistry/ApicurioRegistryConsumerTest.java:
##########
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.apicurioregistry;
+
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import io.apicurio.registry.rest.client.RegistryClient;
+import io.apicurio.registry.rest.client.models.SearchedVersion;
+import io.apicurio.registry.rest.client.models.VersionSearchResults;
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+class ApicurioRegistryConsumerTest extends CamelTestSupport {
+
+    private final RegistryClient mockClient = mock(RegistryClient.class, 
org.mockito.Mockito.RETURNS_DEEP_STUBS);
+
+    @BindToRegistry("apicurio-registry")
+    public ApicurioRegistryComponent getComponent() {
+        ApicurioRegistryComponent component = new 
ApicurioRegistryComponent(context);
+        
component.getConfiguration().setRegistryUrl("http://localhost:8080/apis/registry/v3";);
+        return component;
+    }
+
+    @Override
+    protected RoutesBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                
from("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&delay=500";)
+                        .to("mock:result");
+            }
+        };
+    }
+
+    private void injectMockClient() {
+        ApicurioRegistryEndpoint endpoint = (ApicurioRegistryEndpoint) 
context.getEndpoint(
+                
"apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&delay=500";);
+        endpoint.setRegistryClient(mockClient);
+    }
+
+    @Test
+    void testPollNewVersions() throws Exception {

Review Comment:
   **Bugbot (test coverage):** Consumer tests cover happy-path polling but not: 
(1) `fetchContent=true` body vs metadata, (2) missing groupId/artifactId 
`IllegalArgumentException`, (3) out-of-order `globalId` list (regression for 
watermark bug). Recommend at least one test per gap.
   
   _AI-generated Bugbot test-coverage comment on behalf of atiaomar1978-hub._



##########
components/camel-apicurio-registry/src/test/java/org/apache/camel/component/apicurioregistry/integration/ApicurioRegistryValidateIT.java:
##########
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.apicurioregistry.integration;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.apicurioregistry.ApicurioRegistryConstants;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+class ApicurioRegistryValidateIT extends ApicurioRegistryTestSupport {
+
+    private static final String JSON_SCHEMA = """
+            {
+                "$schema": "http://json-schema.org/draft-07/schema#";,
+                "type": "object",
+                "properties": {
+                    "name": {"type": "string"},
+                    "age": {"type": "integer"}
+                },
+                "required": ["name"]
+            }
+            """;
+
+    private final String groupId = "validate-group-" + UUID.randomUUID();
+    private final String artifactId = "validate-artifact-" + UUID.randomUUID();
+
+    @Override
+    protected RoutesBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                from("direct:setup")
+                        
.toD("apicurio-registry:${header.CamelApicurioRegistryGroupId}/${header.CamelApicurioRegistryArtifactId}"
+                             + "?registryUrl=" + getRegistryUrl());
+
+                from("direct:validate")
+                        .to("apicurio-registry:" + groupId + "/" + artifactId
+                            + "?registryUrl=" + getRegistryUrl()
+                            + "&operation=validate&failOnValidation=false");
+
+                from("direct:testCompatibility")
+                        .to("apicurio-registry:" + groupId + "/" + artifactId
+                            + "?registryUrl=" + getRegistryUrl()
+                            + "&operation=testCompatibility");
+            }
+        };
+    }
+
+    @BeforeEach
+    void setupArtifact() {
+        // Create group
+        Map<String, Object> groupHeaders = new HashMap<>();
+        groupHeaders.put(ApicurioRegistryConstants.HEADER_OPERATION, 
ApicurioRegistryConstants.OPERATION_CREATE_GROUP);
+        groupHeaders.put(ApicurioRegistryConstants.HEADER_GROUP_ID, groupId);
+        template.request("direct:setup", exchange -> 
exchange.getIn().setHeaders(groupHeaders));
+
+        // Create artifact with JSON Schema
+        Map<String, Object> createHeaders = new HashMap<>();
+        createHeaders.put(ApicurioRegistryConstants.HEADER_OPERATION, 
ApicurioRegistryConstants.OPERATION_CREATE_ARTIFACT);
+        createHeaders.put(ApicurioRegistryConstants.HEADER_GROUP_ID, groupId);
+        createHeaders.put(ApicurioRegistryConstants.HEADER_ARTIFACT_ID, 
artifactId);
+        createHeaders.put(ApicurioRegistryConstants.HEADER_ARTIFACT_TYPE, 
"JSON");
+        createHeaders.put(ApicurioRegistryConstants.HEADER_IF_EXISTS, 
"FIND_OR_CREATE_VERSION");
+        template.request("direct:setup", exchange -> {
+            exchange.getIn().setHeaders(createHeaders);
+            exchange.getIn().setBody(JSON_SCHEMA);
+        });
+    }
+
+    @Test
+    void testValidateCompatibleContent() {

Review Comment:
   **Bugbot (test coverage):** `validate` IT only checks header is non-null 
with `failOnValidation=false`. Missing: assert `HEADER_VALIDATION_RESULT=true`, 
incompatible content → `false` + error header, and `failOnValidation=true` → 
`ApicurioRegistryValidationException`.
   
   _AI-generated Bugbot test-coverage comment on behalf of atiaomar1978-hub._



##########
components/camel-apicurio-registry/src/test/java/org/apache/camel/component/apicurioregistry/integration/ApicurioRegistryConsumerIT.java:
##########
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.apicurioregistry.integration;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.apicurioregistry.ApicurioRegistryConstants;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.jupiter.api.Test;
+
+class ApicurioRegistryConsumerIT extends ApicurioRegistryTestSupport {
+
+    private static final String JSON_SCHEMA = """
+            {
+                "type": "object",
+                "properties": {
+                    "name": {"type": "string"}
+                }
+            }
+            """;
+
+    private final String groupId = "consumer-test-" + UUID.randomUUID();
+    private final String artifactId = "consumer-artifact-" + UUID.randomUUID();
+
+    @Override
+    protected RoutesBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                // Producer route to create artifacts
+                from("direct:createForConsumer")
+                        
.toD("apicurio-registry:${header.CamelApicurioRegistryGroupId}/${header.CamelApicurioRegistryArtifactId}"
+                             + "?registryUrl=" + getRegistryUrl());
+
+                // Consumer route
+                from("apicurio-registry:" + groupId + "/" + artifactId
+                     + "?registryUrl=" + getRegistryUrl() + "&delay=1000")
+                        .to("mock:consumed");
+            }
+        };
+    }
+
+    @Test
+    void testConsumerReceivesNewVersions() throws Exception {
+        // Create the group first
+        Map<String, Object> groupHeaders = new HashMap<>();
+        groupHeaders.put(ApicurioRegistryConstants.HEADER_OPERATION, 
ApicurioRegistryConstants.OPERATION_CREATE_GROUP);
+        groupHeaders.put(ApicurioRegistryConstants.HEADER_GROUP_ID, groupId);
+        template.request("direct:createForConsumer", exchange -> 
exchange.getIn().setHeaders(groupHeaders));

Review Comment:
   **Bugbot (test coverage):** IT asserts first consumed message headers only. 
No coverage for: publishing a **second** version and verifying exactly one new 
exchange, `fetchContent=true`, or consumer watermark/idempotency across polls.
   
   _AI-generated Bugbot test-coverage comment on behalf of atiaomar1978-hub._



##########
components/camel-apicurio-registry/src/test/java/org/apache/camel/component/apicurioregistry/ApicurioRegistryComponentTest.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.apicurioregistry;
+
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+
+class ApicurioRegistryComponentTest extends CamelTestSupport {
+
+    @Test
+    void testEndpointCreatedWithGroupAndArtifact() throws Exception {
+        ApicurioRegistryEndpoint endpoint = (ApicurioRegistryEndpoint) 
context.getEndpoint(
+                
"apicurio-registry:myGroup/myArtifact?registryUrl=http://localhost:8080/apis/registry/v3";);
+        assertNotNull(endpoint);
+        assertEquals("myGroup", endpoint.getGroupId());
+        assertEquals("myArtifact", endpoint.getArtifactId());
+        assertEquals("http://localhost:8080/apis/registry/v3";, 
endpoint.getConfiguration().getRegistryUrl());
+    }
+
+    @Test
+    void testEndpointCreatedWithGroupOnly() throws Exception {
+        ApicurioRegistryEndpoint endpoint = (ApicurioRegistryEndpoint) 
context.getEndpoint(
+                
"apicurio-registry:myGroup?registryUrl=http://localhost:8080/apis/registry/v3";);
+        assertNotNull(endpoint);
+        assertEquals("myGroup", endpoint.getGroupId());
+        assertNull(endpoint.getArtifactId());
+    }
+
+    @Test
+    void testEndpointWithAuthOptions() throws Exception {

Review Comment:
   **Bugbot (test coverage):** Auth options tested for **basic** config binding 
only. `authType=oidc` (+ token endpoint / client credentials) and actual 
authenticated SDK client creation are untested (unit or IT).
   
   _AI-generated Bugbot test-coverage comment on behalf of atiaomar1978-hub._



##########
components/camel-apicurio-registry/src/test/java/org/apache/camel/component/apicurioregistry/integration/ApicurioRegistryProducerIT.java:
##########
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.apicurioregistry.integration;
+
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import io.apicurio.registry.rest.client.models.ArtifactMetaData;
+import io.apicurio.registry.rest.client.models.CreateArtifactResponse;
+import io.apicurio.registry.rest.client.models.GroupMetaData;
+import io.apicurio.registry.rest.client.models.VersionMetaData;
+import io.apicurio.registry.rest.client.models.VersionSearchResults;
+import org.apache.camel.Exchange;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.apicurioregistry.ApicurioRegistryConstants;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+class ApicurioRegistryProducerIT extends ApicurioRegistryTestSupport {
+
+    private static final String JSON_SCHEMA = """
+            {
+                "type": "object",
+                "properties": {
+                    "name": {"type": "string"},
+                    "age": {"type": "integer"}
+                }
+            }
+            """;
+
+    private static final String JSON_SCHEMA_V2 = """
+            {
+                "type": "object",
+                "properties": {
+                    "name": {"type": "string"},
+                    "age": {"type": "integer"},
+                    "email": {"type": "string"}
+                }
+            }
+            """;
+
+    @Override
+    protected RoutesBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {

Review Comment:
   **Grok (test coverage):** `testFullArtifactLifecycle` is excellent 
end-to-end coverage (7 ops in one flow). Consider splitting failure-path tests: 
delete missing artifact, update before create, invalid `ifExists` value.
   
   _AI-generated Grok test-coverage comment on behalf of atiaomar1978-hub._



##########
components/camel-apicurio-registry/src/test/java/org/apache/camel/component/apicurioregistry/ApicurioRegistryProducerTest.java:
##########
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.apicurioregistry;
+
+import java.io.ByteArrayInputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+
+import io.apicurio.registry.rest.client.RegistryClient;
+import io.apicurio.registry.rest.client.models.ArtifactMetaData;
+import io.apicurio.registry.rest.client.models.CreateArtifact;
+import io.apicurio.registry.rest.client.models.CreateArtifactResponse;
+import io.apicurio.registry.rest.client.models.CreateGroup;
+import io.apicurio.registry.rest.client.models.CreateVersion;
+import io.apicurio.registry.rest.client.models.GroupMetaData;
+import io.apicurio.registry.rest.client.models.VersionMetaData;
+import io.apicurio.registry.rest.client.models.VersionSearchResults;
+import org.apache.camel.BindToRegistry;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+class ApicurioRegistryProducerTest extends CamelTestSupport {
+
+    private final RegistryClient mockClient = mock(RegistryClient.class, 
org.mockito.Mockito.RETURNS_DEEP_STUBS);
+
+    @BindToRegistry("apicurio-registry")
+    public ApicurioRegistryComponent getComponent() {
+        ApicurioRegistryComponent component = new 
ApicurioRegistryComponent(context);
+        
component.getConfiguration().setRegistryUrl("http://localhost:8080/apis/registry/v3";);
+        return component;
+    }
+
+    @Override
+    protected RoutesBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            @Override
+            public void configure() {
+                from("direct:createArtifact")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=createArtifact";);
+
+                from("direct:deleteArtifact")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=deleteArtifact";);
+
+                from("direct:getArtifactMetadata")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=getArtifactMetadata";);
+
+                from("direct:getArtifactContent")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=getArtifactContent";);
+
+                from("direct:listVersions")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=listVersions";);
+
+                from("direct:createGroup")
+                        
.to("apicurio-registry:newGroup?registryUrl=http://localhost:8080/apis/registry/v3&operation=createGroup";);
+
+                from("direct:updateArtifact")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3&operation=updateArtifact";);
+
+                from("direct:searchArtifacts")
+                        
.to("apicurio-registry:testGroup?registryUrl=http://localhost:8080/apis/registry/v3&operation=searchArtifacts";);
+
+                from("direct:operationFromHeader")
+                        
.to("apicurio-registry:testGroup/testArtifact?registryUrl=http://localhost:8080/apis/registry/v3";);
+            }
+        };
+    }
+
+    private void injectMockClient(String endpointUri) throws Exception {
+        ApicurioRegistryEndpoint endpoint = (ApicurioRegistryEndpoint) 
context.getEndpoint(endpointUri);
+        endpoint.setRegistryClient(mockClient);
+    }
+
+    @Test

Review Comment:
   **Grok (test coverage):** Mocked producer tests verify SDK delegation but 
not header propagation (`ifExists`, `contentType`, `version`, URI path 
overrides via headers). One parameterized test per header family would tighten 
regression safety.
   
   _AI-generated Grok test-coverage comment on behalf of atiaomar1978-hub._



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to