This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 265bd0b8a06bf66ee893dbda05a8422fd773fe05
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Wed Jul 24 16:52:59 2019 +0200

    Camel-Google-Drive: Use BindToRegistry annotation where possible
---
 .../camel/component/google/drive/CustomClientFactoryTest.java | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git 
a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/CustomClientFactoryTest.java
 
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/CustomClientFactoryTest.java
index 1a2eaac..f0f16c5 100644
--- 
a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/CustomClientFactoryTest.java
+++ 
b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/CustomClientFactoryTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.google.drive;
 
+import org.apache.camel.BindToRegistry;
 import org.apache.camel.Endpoint;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.JndiRegistry;
@@ -26,6 +27,9 @@ import org.junit.Test;
  */
 public class CustomClientFactoryTest extends AbstractGoogleDriveTestSupport {
 
+       @BindToRegistry("myAuth")
+       private MyClientFactory cf = new MyClientFactory();
+       
     @Test
     public void testClientFactoryUpdated() throws Exception {
         Endpoint endpoint = 
context.getEndpoint("google-drive://drive-files/list?clientFactory=#myAuth");
@@ -34,13 +38,6 @@ public class CustomClientFactoryTest extends 
AbstractGoogleDriveTestSupport {
     }
 
     @Override
-    protected JndiRegistry createRegistry() throws Exception {
-        JndiRegistry registry = super.createRegistry();
-        registry.bind("myAuth", new MyClientFactory());
-        return registry;
-    }
-
-    @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() {           

Reply via email to