camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject [02/21] git commit: CAMEL-7580 - Initial cut of google drive component
Date Mon, 08 Sep 2014 13:57:39 GMT
CAMEL-7580 - Initial cut of google drive component


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/301153bb
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/301153bb
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/301153bb

Branch: refs/heads/master
Commit: 301153bb55afc839ca71e81254fc1c11cf07a6fe
Parents: 97aa19b
Author: Jonathan Anstey <janstey@gmail.com>
Authored: Fri Jul 4 16:48:02 2014 -0230
Committer: Jonathan Anstey <janstey@gmail.com>
Committed: Mon Sep 8 09:06:08 2014 -0230

----------------------------------------------------------------------
 components/camel-google-drive/pom.xml           | 308 +++++++++++++++++++
 .../google/drive/GoogleDriveComponent.java      |  35 +++
 .../google/drive/GoogleDriveConfiguration.java  |  69 +++++
 .../google/drive/GoogleDriveConsumer.java       |  35 +++
 .../google/drive/GoogleDriveEndpoint.java       | 123 ++++++++
 .../google/drive/GoogleDriveProducer.java       |  40 +++
 .../drive/internal/GoogleDriveConstants.java    |  13 +
 .../internal/GoogleDrivePropertiesHelper.java   |  24 ++
 .../org/apache/camel/component/google-drive     |   1 +
 .../src/main/resources/log4j.properties         |  79 +++++
 .../drive/AbstractGoogleDriveTestSupport.java   | 119 +++++++
 .../google/drive/DriveAboutIntegrationTest.java |  49 +++
 .../google/drive/DriveAppsIntegrationTest.java  |  64 ++++
 .../drive/DriveChangesIntegrationTest.java      |  79 +++++
 .../drive/DriveChannelsIntegrationTest.java     |  51 +++
 .../drive/DriveChildrenIntegrationTest.java     | 111 +++++++
 .../drive/DriveCommentsIntegrationTest.java     | 155 ++++++++++
 .../google/drive/DriveFilesIntegrationTest.java | 261 ++++++++++++++++
 .../drive/DriveParentsIntegrationTest.java      | 111 +++++++
 .../drive/DrivePermissionsIntegrationTest.java  | 170 ++++++++++
 .../drive/DrivePropertiesIntegrationTest.java   | 155 ++++++++++
 .../drive/DriveRealtimeIntegrationTest.java     |  86 ++++++
 .../drive/DriveRepliesIntegrationTest.java      | 170 ++++++++++
 .../drive/DriveRevisionsIntegrationTest.java    | 135 ++++++++
 .../src/test/resources/log4j.properties         |  14 +
 25 files changed, 2457 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/pom.xml b/components/camel-google-drive/pom.xml
new file mode 100644
index 0000000..e637023
--- /dev/null
+++ b/components/camel-google-drive/pom.xml
@@ -0,0 +1,308 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-google-drive-parent</artifactId>
+    <version>2.14-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>camel-google-drive</artifactId>
+  <packaging>bundle</packaging>
+  <name>Camel GoogleDrive Component</name>
+  <description>Camel Component for GoogleDrive</description>
+  <url>http://www.myorganization.org</url>
+
+  <properties>
+    <schemeName>google-drive</schemeName>
+    <componentName>GoogleDrive</componentName>
+    <componentPackage>org.apache.camel.component.google.drive</componentPackage>
+    <outPackage>org.apache.camel.component.google.drive.internal</outPackage>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+      <version>2.14-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+        <groupId>com.google.api-client</groupId>
+        <artifactId>google-api-client</artifactId>
+        <version>1.18.0-rc</version>
+    </dependency>
+    <dependency>
+        <groupId>com.google.oauth-client</groupId>
+        <artifactId>google-oauth-client-jetty</artifactId>
+        <version>1.18.0-rc</version>
+    </dependency>
+    <dependency>
+        <groupId>com.google.http-client</groupId>
+        <artifactId>google-http-client-jackson2</artifactId>
+        <version>1.18.0-rc</version>
+    </dependency>
+    <dependency>
+        <groupId>com.google.apis</groupId>
+        <artifactId>google-api-services-drive</artifactId>
+        <version>v2-rev123-1.18.0-rc</version>
+    </dependency>
+
+    <!-- Camel annotations in provided scope to avoid compile errors in IDEs -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>spi-annotations</artifactId>
+      <version>2.14-SNAPSHOT</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- Component API javadoc in provided scope to read API signatures -->
+    <dependency>
+        <groupId>com.google.apis</groupId>
+        <artifactId>google-api-services-drive</artifactId>
+        <version>v2-rev123-1.18.0-rc</version>
+      <classifier>javadoc</classifier>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- logging -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>1.7.7</version>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>1.7.7</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.17</version>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- testing -->
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test</artifactId>
+      <version>2.14-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <defaultGoal>install</defaultGoal>
+
+    <plugins>
+      
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.5.1</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+      
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.6</version>
+        <configuration>
+          <encoding>UTF-8</encoding>
+        </configuration>
+      </plugin>
+
+      <!-- to generate the MANIFEST-FILE of the bundle -->
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>2.3.7</version>
+        <extensions>true</extensions>
+        <configuration>
+          <instructions>
+            <Bundle-Name>Camel Component for ${componentName}</Bundle-Name>
+            <Bundle-SymbolicName>org.apache.camel.camel-google-drive</Bundle-SymbolicName>
+            <Export-Service>org.apache.camel.spi.ComponentResolver;component=${schemeName}</Export-Service>
+            <Export-Package>${componentPackage};version=${project.version}</Export-Package>
+            <Import-Package>
+              ${componentPackage}.api;version=${project.version},
+              ${componentPackage};version=${project.version},
+              org.apache.camel.*;version=2.14-SNAPSHOT
+            </Import-Package>
+            <Private-Package>${outPackage}</Private-Package>
+            <Implementation-Title>Apache Camel</Implementation-Title>
+            <Implementation-Version>${project.version}</Implementation-Version>
+            <Karaf-Info>Camel;${project.artifactId}=${project.version}</Karaf-Info>
+            <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
+            <_failok>false</_failok>
+          </instructions>
+        </configuration>
+      </plugin>
+
+      <!-- generate Component source and test source -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-api-component-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>generate-test-component-classes</id>
+            <goals>
+              <goal>fromApis</goal>
+            </goals>
+            <configuration>
+              <apis>
+                <api>
+                  <apiName>drive-about</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$About</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-apps</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Apps</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-changes</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Changes</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-channels</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Channels</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-children</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Children</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-comments</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Comments</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-files</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Files</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-parents</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Parents</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-permissions</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Permissions</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-properties</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Properties</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-realtime</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Realtime</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-replies</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Replies</proxyClass>
+                  <fromJavadoc/>
+                </api>
+                <api>
+                  <apiName>drive-revisions</apiName>
+                  <proxyClass>com.google.api.services.drive.Drive$Revisions</proxyClass>
+                  <fromJavadoc/>
+                </api>
+              </apis>
+                  <substitutions>
+                    <substitution>
+                      <method>^.+$</method>
+                      <argName>content</argName>
+                      <argType>com.google.api.services.drive.model.Channel</argType>
+                      <replacement>contentChannel</replacement>
+                    </substitution>
+                  </substitutions> 
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <!-- add generated source and test source to build -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.8</version>
+        <executions>
+          <execution>
+            <id>add-generated-sources</id>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${project.build.directory}/generated-sources/camel-component</source>
+              </sources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>add-generated-test-sources</id>
+            <goals>
+              <goal>add-test-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${project.build.directory}/generated-test-sources/camel-component</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.camel</groupId>
+          <artifactId>camel-api-component-maven-plugin</artifactId>
+          <version>2.14-SNAPSHOT</version>
+          <configuration>
+            <scheme>${schemeName}</scheme>
+            <componentName>${componentName}</componentName>
+            <componentPackage>${componentPackage}</componentPackage>
+            <outPackage>${outPackage}</outPackage>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-api-component-maven-plugin</artifactId>
+        <version>2.14-SNAPSHOT</version>
+        <configuration>
+          <scheme>${schemeName}</scheme>
+          <componentName>${componentName}</componentName>
+          <componentPackage>${componentPackage}</componentPackage>
+          <outPackage>${outPackage}</outPackage>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
+</project>

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
new file mode 100644
index 0000000..e26b5ca
--- /dev/null
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveComponent.java
@@ -0,0 +1,35 @@
+package org.apache.camel.component.google.drive;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.util.component.AbstractApiComponent;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiName;
+
+/**
+ * Represents the component that manages {@link GoogleDriveEndpoint}.
+ */
+@UriEndpoint(scheme = "google-drive", consumerClass = GoogleDriveConsumer.class, consumerPrefix = "consumer")
+public class GoogleDriveComponent extends AbstractApiComponent<GoogleDriveApiName, GoogleDriveConfiguration, GoogleDriveApiCollection> {
+
+    public GoogleDriveComponent() {
+        super(GoogleDriveEndpoint.class, GoogleDriveApiName.class, GoogleDriveApiCollection.getCollection());
+    }
+
+    public GoogleDriveComponent(CamelContext context) {
+        super(context, GoogleDriveEndpoint.class, GoogleDriveApiName.class, GoogleDriveApiCollection.getCollection());
+    }
+
+    @Override
+    protected GoogleDriveApiName getApiName(String apiNameStr) throws IllegalArgumentException {
+        return GoogleDriveApiName.fromValue(apiNameStr);
+    }
+
+    @Override
+    protected Endpoint createEndpoint(String uri, String methodName, GoogleDriveApiName apiName,
+                                      GoogleDriveConfiguration endpointConfiguration) {
+        return new GoogleDriveEndpoint(uri, this, apiName, methodName, endpointConfiguration);
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConfiguration.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConfiguration.java
new file mode 100644
index 0000000..df1bdf7
--- /dev/null
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConfiguration.java
@@ -0,0 +1,69 @@
+package org.apache.camel.component.google.drive;
+
+import java.util.Map;
+
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+
+/**
+ * Component configuration for GoogleDrive component.
+ */
+@UriParams
+public class GoogleDriveConfiguration {
+
+    @UriParam
+    private String clientId;
+
+    @UriParam
+    private String clientSecret;
+
+    @UriParam
+    private String accessToken;
+
+    @UriParam
+    private String refreshToken;
+
+    @UriParam
+    private String applicationName;
+    
+    public String getClientId() {
+        return clientId;
+    }
+
+    public void setClientId(String clientId) {
+        this.clientId = clientId;
+    }
+
+    public String getClientSecret() {
+        return clientSecret;
+    }
+
+    public void setClientSecret(String clientSecret) {
+        this.clientSecret = clientSecret;
+    }
+
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    public void setAccessToken(String accessToken) {
+        this.accessToken = accessToken;
+    }
+
+    public String getRefreshToken() {
+        return refreshToken;
+    }
+
+    public void setRefreshToken(String refreshToken) {
+        this.refreshToken = refreshToken;
+    }
+
+    public String getApplicationName() {
+        return applicationName;
+    }
+
+    public void setApplicationName(String applicationName) {
+        this.applicationName = applicationName;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConsumer.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConsumer.java
new file mode 100644
index 0000000..c3a347b
--- /dev/null
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveConsumer.java
@@ -0,0 +1,35 @@
+package org.apache.camel.component.google.drive;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.camel.Processor;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.util.component.AbstractApiConsumer;
+import org.apache.camel.util.component.ApiMethod;
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiName;
+
+import com.google.api.client.googleapis.services.AbstractGoogleClientRequest;
+
+/**
+ * The GoogleDrive consumer.
+ */
+public class GoogleDriveConsumer extends AbstractApiConsumer<GoogleDriveApiName, GoogleDriveConfiguration> {
+
+    public GoogleDriveConsumer(GoogleDriveEndpoint endpoint, Processor processor) {
+        super(endpoint, processor);
+    } 
+    
+    @Override
+    protected Object doInvokeMethod(Map<String, Object> properties) throws RuntimeCamelException {
+        AbstractGoogleClientRequest request = (AbstractGoogleClientRequest) super.doInvokeMethod(properties);
+        // TODO set any generic params, like OAuth token, etc.
+        try {
+            return request.execute();
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return null;
+    }    
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
new file mode 100644
index 0000000..44d4d4b
--- /dev/null
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveEndpoint.java
@@ -0,0 +1,123 @@
+package org.apache.camel.component.google.drive;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.util.component.AbstractApiEndpoint;
+import org.apache.camel.util.component.ApiMethod;
+import org.apache.camel.util.component.ApiMethodPropertiesHelper;
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiName;
+import org.apache.camel.component.google.drive.internal.GoogleDriveConstants;
+import org.apache.camel.component.google.drive.internal.GoogleDrivePropertiesHelper;
+
+import com.google.api.client.auth.oauth2.Credential;
+import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp;
+import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
+import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow;
+import com.google.api.client.http.javanet.NetHttpTransport;
+import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.util.store.FileDataStoreFactory;
+import com.google.api.services.drive.Drive;
+import com.google.api.services.drive.DriveScopes;
+
+/**
+ * Represents a GoogleDrive endpoint.
+ */
+@UriEndpoint(scheme = "google-drive", consumerClass = GoogleDriveConsumer.class, consumerPrefix = "consumer")
+public class GoogleDriveEndpoint extends AbstractApiEndpoint<GoogleDriveApiName, GoogleDriveConfiguration> {
+    private Object apiProxy;
+    private Drive client;
+    
+    // TODO these need to be configurable
+    private NetHttpTransport transport = new NetHttpTransport();
+    private JacksonFactory jsonFactory = new JacksonFactory();
+    private FileDataStoreFactory dataStoreFactory;
+    
+    // Directory to store user credentials
+    private static final java.io.File DATA_STORE_DIR = new java.io.File(
+        System.getProperty("user.home"), ".store/drive_sample");
+    
+
+    
+    public GoogleDriveEndpoint(String uri, GoogleDriveComponent component,
+                         GoogleDriveApiName apiName, String methodName, GoogleDriveConfiguration endpointConfiguration) {
+        super(uri, component, apiName, methodName, GoogleDriveApiCollection.getCollection().getHelper(apiName), endpointConfiguration);
+
+    }
+
+    public Producer createProducer() throws Exception {
+        return new GoogleDriveProducer(this);
+    }
+
+    public Consumer createConsumer(Processor processor) throws Exception {
+        // make sure inBody is not set for consumers
+        if (inBody != null) {
+            throw new IllegalArgumentException("Option inBody is not supported for consumer endpoint");
+        }
+        final GoogleDriveConsumer consumer = new GoogleDriveConsumer(this, processor);
+        // also set consumer.* properties
+        configureConsumer(consumer);
+        return consumer;
+    }
+
+    @Override
+    protected ApiMethodPropertiesHelper<GoogleDriveConfiguration> getPropertiesHelper() {
+        return GoogleDrivePropertiesHelper.getHelper();
+    }
+
+    protected String getThreadProfileName() {
+        return GoogleDriveConstants.THREAD_PROFILE_NAME;
+    }
+
+    // Authorizes the installed application to access user's protected data.
+    private Credential authorize() throws Exception {
+      dataStoreFactory = new FileDataStoreFactory(DATA_STORE_DIR);
+      // set up authorization code flow
+      // TODO refresh token support too
+      GoogleAuthorizationCodeFlow flow =
+          new GoogleAuthorizationCodeFlow.Builder(transport, jsonFactory, configuration.getClientId(), configuration.getClientSecret(),
+              Collections.singleton(DriveScopes.DRIVE_FILE)).setDataStoreFactory(dataStoreFactory)
+              .build();
+      // authorize
+      return new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize("user");
+    }
+
+    
+    @Override
+    protected void afterConfigureProperties() {
+        // TODO create API proxy, set connection properties, etc.
+        
+        switch ((GoogleDriveApiName) apiName) {
+            case DRIVE_FILES:
+                apiProxy = getClient().files();
+                break;
+                // TODO add extra APIs here
+            default:
+                throw new IllegalArgumentException("Invalid API name " + apiName);
+        } 
+    }
+
+    public Drive getClient() {
+        if (client == null) {
+            Credential credential;
+            try {
+                credential = authorize();
+                client = new Drive.Builder(transport, jsonFactory, credential).build();
+            } catch (Exception e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+        }
+        return client;
+    }
+    
+    @Override
+    public Object getApiProxy(ApiMethod method, Map<String, Object> args) {
+        return apiProxy;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveProducer.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveProducer.java
new file mode 100644
index 0000000..1cf02cf
--- /dev/null
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/GoogleDriveProducer.java
@@ -0,0 +1,40 @@
+package org.apache.camel.component.google.drive;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.util.component.AbstractApiProducer;
+import org.apache.camel.util.component.ApiMethod;
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiName;
+import org.apache.camel.component.google.drive.internal.GoogleDriveConstants;
+import org.apache.camel.component.google.drive.internal.GoogleDrivePropertiesHelper;
+
+import com.google.api.client.googleapis.services.AbstractGoogleClientRequest;
+
+/**
+ * The GoogleDrive producer.
+ */
+public class GoogleDriveProducer extends AbstractApiProducer<GoogleDriveApiName, GoogleDriveConfiguration> {
+
+    public GoogleDriveProducer(GoogleDriveEndpoint endpoint) {
+        super(endpoint, GoogleDrivePropertiesHelper.getHelper());
+    }
+
+    @Override
+    protected Object doInvokeMethod(ApiMethod method, Map<String, Object> properties) throws RuntimeCamelException {
+        AbstractGoogleClientRequest request = (AbstractGoogleClientRequest) super.doInvokeMethod(method, properties);
+        // TODO set any generic params, like OAuth token, etc.
+        try {
+            return request.execute();
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        return null;
+    }
+    
+    protected String getThreadProfileName() {
+        return GoogleDriveConstants.THREAD_PROFILE_NAME;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/internal/GoogleDriveConstants.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/internal/GoogleDriveConstants.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/internal/GoogleDriveConstants.java
new file mode 100644
index 0000000..870cf99
--- /dev/null
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/internal/GoogleDriveConstants.java
@@ -0,0 +1,13 @@
+package org.apache.camel.component.google.drive.internal;
+
+/**
+ * Constants for GoogleDrive component.
+ */
+public interface GoogleDriveConstants {
+
+    // suffix for parameters when passed as exchange header properties
+    String PROPERTY_PREFIX = "CamelGoogleDrive.";
+
+    // thread profile name for this component
+    String THREAD_PROFILE_NAME = "CamelGoogleDrive";
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/internal/GoogleDrivePropertiesHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/internal/GoogleDrivePropertiesHelper.java b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/internal/GoogleDrivePropertiesHelper.java
new file mode 100644
index 0000000..6fb132b
--- /dev/null
+++ b/components/camel-google-drive/src/main/java/org/apache/camel/component/google/drive/internal/GoogleDrivePropertiesHelper.java
@@ -0,0 +1,24 @@
+package org.apache.camel.component.google.drive.internal;
+
+import org.apache.camel.util.component.ApiMethodPropertiesHelper;
+
+import org.apache.camel.component.google.drive.GoogleDriveConfiguration;
+
+/**
+ * Singleton {@link ApiMethodPropertiesHelper} for GoogleDrive component.
+ */
+public final class GoogleDrivePropertiesHelper extends ApiMethodPropertiesHelper<GoogleDriveConfiguration> {
+
+    private static GoogleDrivePropertiesHelper helper;
+
+    private GoogleDrivePropertiesHelper() {
+        super(GoogleDriveConfiguration.class, GoogleDriveConstants.PROPERTY_PREFIX);
+    }
+
+    public static synchronized GoogleDrivePropertiesHelper getHelper() {
+        if (helper == null) {
+            helper = new GoogleDrivePropertiesHelper();
+        }
+        return helper;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/main/resources/META-INF/services/org/apache/camel/component/google-drive
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/resources/META-INF/services/org/apache/camel/component/google-drive b/components/camel-google-drive/src/main/resources/META-INF/services/org/apache/camel/component/google-drive
new file mode 100644
index 0000000..958560f
--- /dev/null
+++ b/components/camel-google-drive/src/main/resources/META-INF/services/org/apache/camel/component/google-drive
@@ -0,0 +1 @@
+class=org.apache.camel.component.google.drive.GoogleDriveComponent

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/main/resources/log4j.properties b/components/camel-google-drive/src/main/resources/log4j.properties
new file mode 100644
index 0000000..c3eb9f7
--- /dev/null
+++ b/components/camel-google-drive/src/main/resources/log4j.properties
@@ -0,0 +1,79 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+#
+# The logging properties used during tests..
+#
+log4j.rootLogger=INFO, file
+log4j.logger.org.apache.camel.customlogger=TRACE, file2
+
+#log4j.logger.org.apache.camel.impl.converter=WARN
+#log4j.logger.org.apache.camel.management=WARN
+log4j.logger.org.apache.camel.impl.DefaultPackageScanClassResolver=WARN
+#log4j.logger.org.apache.camel.impl.converter.DefaultTypeConverter=TRACE
+#log4j.logger.org.apache.camel.impl.converter=DEBUG
+
+#log4j.logger.org.apache.camel=DEBUG
+#log4j.logger.org.apache.camel.builder=TRACE
+#log4j.logger.org.apache.camel.language.simple=TRACE
+#log4j.logger.org.apache.camel.component=TRACE
+#log4j.logger.org.apache.camel.component.seda=TRACE
+#log4j.logger.org.apache.camel.component.file=TRACE
+#log4j.logger.org.apache.camel.impl.DefaultUnitOfWork=TRACE
+#log4j.logger.org.apache.camel.impl.DefaultExecutorServiceManager=TRACE
+#log4j.logger.org.apache.camel.component.mock=DEBUG
+#log4j.logger.org.apache.camel.component.file=TRACE
+#log4j.logger.org.apache.camel.processor.DefaultErrorHandler=TRACE
+#log4j.logger.org.apache.camel.processor.DeadLetterChannel=TRACE
+#log4j.logger.org.apache.camel.processor.Pipeline=TRACE
+#log4j.logger.org.apache.camel.processor.MulticastProcessor=TRACE
+#log4j.logger.org.apache.camel.processor.RecipientList=TRACE
+#log4j.logger.org.apache.camel.processor.RecipientListProcessor=TRACE
+#log4j.logger.org.apache.camel.processor.RoutingSlip=TRACE
+#log4j.logger.org.apache.camel.processor.TryProcessor=TRACE
+#log4j.logger.org.apache.camel.processor.loadbalancer=TRACE
+#log4j.logger.org.apache.camel.processor.Delayer=TRACE
+#log4j.logger.org.apache.camel.processor.Throttler=TRACE
+#log4j.logger.org.apache.camel.processor.aggregate.AggregateProcessor=DEBUG
+#log4j.logger.org.apache.camel.impl=TRACE
+#log4j.logger.org.apache.camel.util.FileUtil=TRACE
+#log4j.logger.org.apache.camel.util.AsyncProcessorHelper=TRACE
+#log4j.logger.org.apache.camel.util.ServiceHelper=TRACE
+#log4j.logger.org.apache.camel.util.jsse=TRACE
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+# MDC
+#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %-10.10X{camel.breadcrumbId} - %-10.10X{camel.exchangeId} - %-10.10X{camel.correlationId} - %-10.10X{camel.routeId} - %m%n
+
+# File appender
+log4j.appender.file=org.apache.log4j.FileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.file=target/camel-core-test.log
+log4j.appender.file.append=true
+log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
+# MDC
+#log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %-10.10X{camel.breadcrumbId} - %-10.10X{camel.exchangeId} - %-10.10X{camel.correlationId} - %-10.10X{camel.routeId} - %m%n
+
+# File appender for logging with provided logger
+log4j.appender.file2=org.apache.log4j.FileAppender
+log4j.appender.file2.layout=org.apache.log4j.PatternLayout
+log4j.appender.file2.file=target/custom-logger-test.log
+log4j.appender.file2.append=false
+log4j.appender.file2.layout.ConversionPattern=%-5p %c{1} %m%n

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/AbstractGoogleDriveTestSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/AbstractGoogleDriveTestSupport.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/AbstractGoogleDriveTestSupport.java
new file mode 100644
index 0000000..45f7b51
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/AbstractGoogleDriveTestSupport.java
@@ -0,0 +1,119 @@
+/**
+ * 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.google.drive;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelExecutionException;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.IntrospectionSupport;
+import org.junit.AfterClass;
+
+public abstract class AbstractGoogleDriveTestSupport extends CamelTestSupport {
+
+    protected static final String CAMEL_TEST_TAG = "camel_was_here";
+    protected static final String CAMEL_TEST_FILE = "CamelTestFile";
+    private static final String LINE_SEPARATOR = System.getProperty("line.separator");
+    private static final String TEST_OPTIONS_PROPERTIES = "/test-options.properties";
+    private static final String REFRESH_TOKEN_PROPERTY = "refreshToken";
+    protected static String testUserId;
+
+    private static String refreshToken;
+    private static String propertyText;
+
+    protected static String testFolderId;
+    protected static String testFileId;
+
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+
+        final InputStream in = getClass().getResourceAsStream(TEST_OPTIONS_PROPERTIES);
+        if (in == null) {
+            throw new IOException(TEST_OPTIONS_PROPERTIES + " could not be found");
+        }
+
+        final StringBuilder builder = new StringBuilder();
+        final BufferedReader reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
+        String line;
+        while((line = reader.readLine()) != null) {
+            builder.append(line).append(LINE_SEPARATOR);
+        }
+        propertyText = builder.toString();
+
+        final Properties properties = new Properties();
+        try {
+            properties.load(new StringReader(propertyText));
+        } catch (IOException e) {
+            throw new IOException(String.format("%s could not be loaded: %s", TEST_OPTIONS_PROPERTIES, e.getMessage()),
+                e);
+        }
+
+        // cache test properties
+        refreshToken = properties.getProperty(REFRESH_TOKEN_PROPERTY);
+        testFolderId = properties.getProperty("testFolderId");
+        testFileId = properties.getProperty("testFileId");
+        testUserId = properties.getProperty("testUserId");
+
+        Map<String, Object> options = new HashMap<String, Object>();
+        for (Map.Entry<Object, Object> entry : properties.entrySet()) {
+            options.put(entry.getKey().toString(), entry.getValue());
+        }
+
+        final GoogleDriveConfiguration configuration = new GoogleDriveConfiguration();
+        IntrospectionSupport.setProperties(configuration, options);
+
+        // add GoogleDriveComponent  to Camel context
+        final CamelContext context = super.createCamelContext();
+        final GoogleDriveComponent component = new GoogleDriveComponent(context);
+
+        component.setConfiguration(configuration);
+        context.addComponent("box", component);
+
+        return context;
+    }
+
+    @AfterClass
+    public static void tearDownAfterClass() throws Exception {
+        CamelTestSupport.tearDownAfterClass();
+    }
+
+    @Override
+    public boolean isCreateCamelContextPerClass() {
+        // only create the context once for this class
+        return true;
+    }
+
+    protected <T> T requestBodyAndHeaders(String endpointUri, Object body, Map<String, Object> headers)
+        throws CamelExecutionException {
+        return (T) template().requestBodyAndHeaders(endpointUri, body, headers);
+    }
+
+    protected <T> T requestBody(String endpoint, Object body) throws CamelExecutionException {
+        return (T) template().requestBody(endpoint, body);
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
new file mode 100644
index 0000000..c20a9e5
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
@@ -0,0 +1,49 @@
+/*
+ * Camel Api Route test generated by camel-component-util-maven-plugin
+ * Generated on: Thu Jul 03 16:04:18 NDT 2014
+ */
+package org.apache.camel.component.google.drive;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.DriveAboutApiMethod;
+
+/**
+ * Test class for com.google.api.services.drive.Drive$About APIs.
+ * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
+ * The class source won't be generated again if the generator MOJO finds it under src/test/java.
+ */
+public class DriveAboutIntegrationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveAboutIntegrationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveAboutApiMethod.class).getName();
+
+    @Ignore
+    @Test
+    public void testGet() throws Exception {
+        final com.google.api.services.drive.Drive.About.Get result = requestBody("direct://GET", null);
+
+        assertNotNull("get result", result);
+        LOG.debug("get: " + result);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                // test route for get
+                from("direct://GET")
+                  .to("google-drive://" + PATH_PREFIX + "/get");
+
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
new file mode 100644
index 0000000..ffce4fe
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
@@ -0,0 +1,64 @@
+/*
+ * Camel Api Route test generated by camel-component-util-maven-plugin
+ * Generated on: Thu Jul 03 16:04:18 NDT 2014
+ */
+package org.apache.camel.component.google.drive;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.DriveAppsApiMethod;
+
+/**
+ * Test class for com.google.api.services.drive.Drive$Apps APIs.
+ * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
+ * The class source won't be generated again if the generator MOJO finds it under src/test/java.
+ */
+public class DriveAppsIntegrationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveAppsIntegrationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveAppsApiMethod.class).getName();
+
+    // TODO provide parameter values for get
+    @Ignore
+    @Test
+    public void testGet() throws Exception {
+        // using String message body for single parameter "appId"
+        final com.google.api.services.drive.Drive.Apps.Get result = requestBody("direct://GET", null);
+
+        assertNotNull("get result", result);
+        LOG.debug("get: " + result);
+    }
+
+    @Ignore
+    @Test
+    public void testList() throws Exception {
+        final com.google.api.services.drive.Drive.Apps.List result = requestBody("direct://LIST", null);
+
+        assertNotNull("list result", result);
+        LOG.debug("list: " + result);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                // test route for get
+                from("direct://GET")
+                  .to("google-drive://" + PATH_PREFIX + "/get?inBody=appId");
+
+                // test route for list
+                from("direct://LIST")
+                  .to("google-drive://" + PATH_PREFIX + "/list");
+
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
new file mode 100644
index 0000000..a6b3ea3
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
@@ -0,0 +1,79 @@
+/*
+ * Camel Api Route test generated by camel-component-util-maven-plugin
+ * Generated on: Thu Jul 03 16:04:18 NDT 2014
+ */
+package org.apache.camel.component.google.drive;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.DriveChangesApiMethod;
+
+/**
+ * Test class for com.google.api.services.drive.Drive$Changes APIs.
+ * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
+ * The class source won't be generated again if the generator MOJO finds it under src/test/java.
+ */
+public class DriveChangesIntegrationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveChangesIntegrationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveChangesApiMethod.class).getName();
+
+    // TODO provide parameter values for get
+    @Ignore
+    @Test
+    public void testGet() throws Exception {
+        // using String message body for single parameter "changeId"
+        final com.google.api.services.drive.Drive.Changes.Get result = requestBody("direct://GET", null);
+
+        assertNotNull("get result", result);
+        LOG.debug("get: " + result);
+    }
+
+    @Ignore
+    @Test
+    public void testList() throws Exception {
+        final com.google.api.services.drive.Drive.Changes.List result = requestBody("direct://LIST", null);
+
+        assertNotNull("list result", result);
+        LOG.debug("list: " + result);
+    }
+
+    // TODO provide parameter values for watch
+    @Ignore
+    @Test
+    public void testWatch() throws Exception {
+        // using com.google.api.services.drive.model.Channel message body for single parameter "contentChannel"
+        final com.google.api.services.drive.Drive.Changes.Watch result = requestBody("direct://WATCH", null);
+
+        assertNotNull("watch result", result);
+        LOG.debug("watch: " + result);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                // test route for get
+                from("direct://GET")
+                  .to("google-drive://" + PATH_PREFIX + "/get?inBody=changeId");
+
+                // test route for list
+                from("direct://LIST")
+                  .to("google-drive://" + PATH_PREFIX + "/list");
+
+                // test route for watch
+                from("direct://WATCH")
+                  .to("google-drive://" + PATH_PREFIX + "/watch?inBody=contentChannel");
+
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChannelsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChannelsIntegrationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChannelsIntegrationTest.java
new file mode 100644
index 0000000..dcdbff7
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChannelsIntegrationTest.java
@@ -0,0 +1,51 @@
+/*
+ * Camel Api Route test generated by camel-component-util-maven-plugin
+ * Generated on: Thu Jul 03 16:04:18 NDT 2014
+ */
+package org.apache.camel.component.google.drive;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.DriveChannelsApiMethod;
+
+/**
+ * Test class for com.google.api.services.drive.Drive$Channels APIs.
+ * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
+ * The class source won't be generated again if the generator MOJO finds it under src/test/java.
+ */
+public class DriveChannelsIntegrationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveChannelsIntegrationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveChannelsApiMethod.class).getName();
+
+    // TODO provide parameter values for stop
+    @Ignore
+    @Test
+    public void testStop() throws Exception {
+        // using com.google.api.services.drive.model.Channel message body for single parameter "contentChannel"
+        final com.google.api.services.drive.Drive.Channels.Stop result = requestBody("direct://STOP", null);
+
+        assertNotNull("stop result", result);
+        LOG.debug("stop: " + result);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                // test route for stop
+                from("direct://STOP")
+                  .to("google-drive://" + PATH_PREFIX + "/stop?inBody=contentChannel");
+
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
new file mode 100644
index 0000000..f2ac396
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
@@ -0,0 +1,111 @@
+/*
+ * Camel Api Route test generated by camel-component-util-maven-plugin
+ * Generated on: Thu Jul 03 16:04:18 NDT 2014
+ */
+package org.apache.camel.component.google.drive;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.DriveChildrenApiMethod;
+
+/**
+ * Test class for com.google.api.services.drive.Drive$Children APIs.
+ * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
+ * The class source won't be generated again if the generator MOJO finds it under src/test/java.
+ */
+public class DriveChildrenIntegrationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveChildrenIntegrationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveChildrenApiMethod.class).getName();
+
+    // TODO provide parameter values for delete
+    @Ignore
+    @Test
+    public void testDelete() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.folderId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.childId", null);
+
+        final com.google.api.services.drive.Drive.Children.Delete result = requestBodyAndHeaders("direct://DELETE", null, headers);
+
+        assertNotNull("delete result", result);
+        LOG.debug("delete: " + result);
+    }
+
+    // TODO provide parameter values for get
+    @Ignore
+    @Test
+    public void testGet() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.folderId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.childId", null);
+
+        final com.google.api.services.drive.Drive.Children.Get result = requestBodyAndHeaders("direct://GET", null, headers);
+
+        assertNotNull("get result", result);
+        LOG.debug("get: " + result);
+    }
+
+    // TODO provide parameter values for insert
+    @Ignore
+    @Test
+    public void testInsert() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.folderId", null);
+        // parameter type is com.google.api.services.drive.model.ChildReference
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Children.Insert result = requestBodyAndHeaders("direct://INSERT", null, headers);
+
+        assertNotNull("insert result", result);
+        LOG.debug("insert: " + result);
+    }
+
+    // TODO provide parameter values for list
+    @Ignore
+    @Test
+    public void testList() throws Exception {
+        // using String message body for single parameter "folderId"
+        final com.google.api.services.drive.Drive.Children.List result = requestBody("direct://LIST", null);
+
+        assertNotNull("list result", result);
+        LOG.debug("list: " + result);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                // test route for delete
+                from("direct://DELETE")
+                  .to("google-drive://" + PATH_PREFIX + "/delete");
+
+                // test route for get
+                from("direct://GET")
+                  .to("google-drive://" + PATH_PREFIX + "/get");
+
+                // test route for insert
+                from("direct://INSERT")
+                  .to("google-drive://" + PATH_PREFIX + "/insert");
+
+                // test route for list
+                from("direct://LIST")
+                  .to("google-drive://" + PATH_PREFIX + "/list?inBody=folderId");
+
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
new file mode 100644
index 0000000..b952a93
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
@@ -0,0 +1,155 @@
+/*
+ * Camel Api Route test generated by camel-component-util-maven-plugin
+ * Generated on: Thu Jul 03 16:04:18 NDT 2014
+ */
+package org.apache.camel.component.google.drive;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.DriveCommentsApiMethod;
+
+/**
+ * Test class for com.google.api.services.drive.Drive$Comments APIs.
+ * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
+ * The class source won't be generated again if the generator MOJO finds it under src/test/java.
+ */
+public class DriveCommentsIntegrationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveCommentsIntegrationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveCommentsApiMethod.class).getName();
+
+    // TODO provide parameter values for delete
+    @Ignore
+    @Test
+    public void testDelete() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.commentId", null);
+
+        final com.google.api.services.drive.Drive.Comments.Delete result = requestBodyAndHeaders("direct://DELETE", null, headers);
+
+        assertNotNull("delete result", result);
+        LOG.debug("delete: " + result);
+    }
+
+    // TODO provide parameter values for get
+    @Ignore
+    @Test
+    public void testGet() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.commentId", null);
+
+        final com.google.api.services.drive.Drive.Comments.Get result = requestBodyAndHeaders("direct://GET", null, headers);
+
+        assertNotNull("get result", result);
+        LOG.debug("get: " + result);
+    }
+
+    // TODO provide parameter values for insert
+    @Ignore
+    @Test
+    public void testInsert() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is com.google.api.services.drive.model.Comment
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Comments.Insert result = requestBodyAndHeaders("direct://INSERT", null, headers);
+
+        assertNotNull("insert result", result);
+        LOG.debug("insert: " + result);
+    }
+
+    // TODO provide parameter values for list
+    @Ignore
+    @Test
+    public void testList() throws Exception {
+        // using String message body for single parameter "fileId"
+        final com.google.api.services.drive.Drive.Comments.List result = requestBody("direct://LIST", null);
+
+        assertNotNull("list result", result);
+        LOG.debug("list: " + result);
+    }
+
+    // TODO provide parameter values for patch
+    @Ignore
+    @Test
+    public void testPatch() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.commentId", null);
+        // parameter type is com.google.api.services.drive.model.Comment
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Comments.Patch result = requestBodyAndHeaders("direct://PATCH", null, headers);
+
+        assertNotNull("patch result", result);
+        LOG.debug("patch: " + result);
+    }
+
+    // TODO provide parameter values for update
+    @Ignore
+    @Test
+    public void testUpdate() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.commentId", null);
+        // parameter type is com.google.api.services.drive.model.Comment
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Comments.Update result = requestBodyAndHeaders("direct://UPDATE", null, headers);
+
+        assertNotNull("update result", result);
+        LOG.debug("update: " + result);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                // test route for delete
+                from("direct://DELETE")
+                  .to("google-drive://" + PATH_PREFIX + "/delete");
+
+                // test route for get
+                from("direct://GET")
+                  .to("google-drive://" + PATH_PREFIX + "/get");
+
+                // test route for insert
+                from("direct://INSERT")
+                  .to("google-drive://" + PATH_PREFIX + "/insert");
+
+                // test route for list
+                from("direct://LIST")
+                  .to("google-drive://" + PATH_PREFIX + "/list?inBody=fileId");
+
+                // test route for patch
+                from("direct://PATCH")
+                  .to("google-drive://" + PATH_PREFIX + "/patch");
+
+                // test route for update
+                from("direct://UPDATE")
+                  .to("google-drive://" + PATH_PREFIX + "/update");
+
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
new file mode 100644
index 0000000..5b38298
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
@@ -0,0 +1,261 @@
+/*
+ * Camel Api Route test generated by camel-component-util-maven-plugin
+ * Generated on: Thu Jul 03 16:04:18 NDT 2014
+ */
+package org.apache.camel.component.google.drive;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.DriveFilesApiMethod;
+
+/**
+ * Test class for com.google.api.services.drive.Drive$Files APIs.
+ * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
+ * The class source won't be generated again if the generator MOJO finds it under src/test/java.
+ */
+public class DriveFilesIntegrationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveFilesIntegrationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveFilesApiMethod.class).getName();
+
+    // TODO provide parameter values for copy
+    @Ignore
+    @Test
+    public void testCopy() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is com.google.api.services.drive.model.File
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Files.Copy result = requestBodyAndHeaders("direct://COPY", null, headers);
+
+        assertNotNull("copy result", result);
+        LOG.debug("copy: " + result);
+    }
+
+    // TODO provide parameter values for delete
+    @Ignore
+    @Test
+    public void testDelete() throws Exception {
+        // using String message body for single parameter "fileId"
+        final com.google.api.services.drive.Drive.Files.Delete result = requestBody("direct://DELETE", null);
+
+        assertNotNull("delete result", result);
+        LOG.debug("delete: " + result);
+    }
+
+    // TODO provide parameter values for get
+    @Ignore
+    @Test
+    public void testGet() throws Exception {
+        // using String message body for single parameter "fileId"
+        final com.google.api.services.drive.Drive.Files.Get result = requestBody("direct://GET", null);
+
+        assertNotNull("get result", result);
+        LOG.debug("get: " + result);
+    }
+
+    // TODO provide parameter values for insert
+    @Ignore
+    @Test
+    public void testInsert() throws Exception {
+        // using com.google.api.services.drive.model.File message body for single parameter "content"
+        final com.google.api.services.drive.Drive.Files.Insert result = requestBody("direct://INSERT", null);
+
+        assertNotNull("insert result", result);
+        LOG.debug("insert: " + result);
+    }
+
+    // TODO provide parameter values for insert
+    @Ignore
+    @Test
+    public void testInsert_1() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is com.google.api.services.drive.model.File
+        headers.put("CamelGoogleDrive.content", null);
+        // parameter type is com.google.api.client.http.AbstractInputStreamContent
+        headers.put("CamelGoogleDrive.mediaContent", null);
+
+        final com.google.api.services.drive.Drive.Files.Insert result = requestBodyAndHeaders("direct://INSERT_1", null, headers);
+
+        assertNotNull("insert result", result);
+        LOG.debug("insert: " + result);
+    }
+
+    @Ignore
+    @Test
+    public void testList() throws Exception {
+        final com.google.api.services.drive.Drive.Files.List result = requestBody("direct://LIST", null);
+
+        assertNotNull("list result", result);
+        LOG.debug("list: " + result);
+    }
+
+    // TODO provide parameter values for patch
+    @Ignore
+    @Test
+    public void testPatch() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is com.google.api.services.drive.model.File
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Files.Patch result = requestBodyAndHeaders("direct://PATCH", null, headers);
+
+        assertNotNull("patch result", result);
+        LOG.debug("patch: " + result);
+    }
+
+    // TODO provide parameter values for touch
+    @Ignore
+    @Test
+    public void testTouch() throws Exception {
+        // using String message body for single parameter "fileId"
+        final com.google.api.services.drive.Drive.Files.Touch result = requestBody("direct://TOUCH", null);
+
+        assertNotNull("touch result", result);
+        LOG.debug("touch: " + result);
+    }
+
+    // TODO provide parameter values for trash
+    @Ignore
+    @Test
+    public void testTrash() throws Exception {
+        // using String message body for single parameter "fileId"
+        final com.google.api.services.drive.Drive.Files.Trash result = requestBody("direct://TRASH", null);
+
+        assertNotNull("trash result", result);
+        LOG.debug("trash: " + result);
+    }
+
+    // TODO provide parameter values for untrash
+    @Ignore
+    @Test
+    public void testUntrash() throws Exception {
+        // using String message body for single parameter "fileId"
+        final com.google.api.services.drive.Drive.Files.Untrash result = requestBody("direct://UNTRASH", null);
+
+        assertNotNull("untrash result", result);
+        LOG.debug("untrash: " + result);
+    }
+
+    // TODO provide parameter values for update
+    @Ignore
+    @Test
+    public void testUpdate() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is com.google.api.services.drive.model.File
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Files.Update result = requestBodyAndHeaders("direct://UPDATE", null, headers);
+
+        assertNotNull("update result", result);
+        LOG.debug("update: " + result);
+    }
+
+    // TODO provide parameter values for update
+    @Ignore
+    @Test
+    public void testUpdate_1() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is com.google.api.services.drive.model.File
+        headers.put("CamelGoogleDrive.content", null);
+        // parameter type is com.google.api.client.http.AbstractInputStreamContent
+        headers.put("CamelGoogleDrive.mediaContent", null);
+
+        final com.google.api.services.drive.Drive.Files.Update result = requestBodyAndHeaders("direct://UPDATE_1", null, headers);
+
+        assertNotNull("update result", result);
+        LOG.debug("update: " + result);
+    }
+
+    // TODO provide parameter values for watch
+    @Ignore
+    @Test
+    public void testWatch() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is com.google.api.services.drive.model.Channel
+        headers.put("CamelGoogleDrive.contentChannel", null);
+
+        final com.google.api.services.drive.Drive.Files.Watch result = requestBodyAndHeaders("direct://WATCH", null, headers);
+
+        assertNotNull("watch result", result);
+        LOG.debug("watch: " + result);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                // test route for copy
+                from("direct://COPY")
+                  .to("google-drive://" + PATH_PREFIX + "/copy");
+
+                // test route for delete
+                from("direct://DELETE")
+                  .to("google-drive://" + PATH_PREFIX + "/delete?inBody=fileId");
+
+                // test route for get
+                from("direct://GET")
+                  .to("google-drive://" + PATH_PREFIX + "/get?inBody=fileId");
+
+                // test route for insert
+                from("direct://INSERT")
+                  .to("google-drive://" + PATH_PREFIX + "/insert?inBody=content");
+
+                // test route for insert
+                from("direct://INSERT_1")
+                  .to("google-drive://" + PATH_PREFIX + "/insert");
+
+                // test route for list
+                from("direct://LIST")
+                  .to("google-drive://" + PATH_PREFIX + "/list");
+
+                // test route for patch
+                from("direct://PATCH")
+                  .to("google-drive://" + PATH_PREFIX + "/patch");
+
+                // test route for touch
+                from("direct://TOUCH")
+                  .to("google-drive://" + PATH_PREFIX + "/touch?inBody=fileId");
+
+                // test route for trash
+                from("direct://TRASH")
+                  .to("google-drive://" + PATH_PREFIX + "/trash?inBody=fileId");
+
+                // test route for untrash
+                from("direct://UNTRASH")
+                  .to("google-drive://" + PATH_PREFIX + "/untrash?inBody=fileId");
+
+                // test route for update
+                from("direct://UPDATE")
+                  .to("google-drive://" + PATH_PREFIX + "/update");
+
+                // test route for update
+                from("direct://UPDATE_1")
+                  .to("google-drive://" + PATH_PREFIX + "/update");
+
+                // test route for watch
+                from("direct://WATCH")
+                  .to("google-drive://" + PATH_PREFIX + "/watch");
+
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveParentsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveParentsIntegrationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveParentsIntegrationTest.java
new file mode 100644
index 0000000..40b1f2a
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveParentsIntegrationTest.java
@@ -0,0 +1,111 @@
+/*
+ * Camel Api Route test generated by camel-component-util-maven-plugin
+ * Generated on: Thu Jul 03 16:04:18 NDT 2014
+ */
+package org.apache.camel.component.google.drive;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.DriveParentsApiMethod;
+
+/**
+ * Test class for com.google.api.services.drive.Drive$Parents APIs.
+ * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
+ * The class source won't be generated again if the generator MOJO finds it under src/test/java.
+ */
+public class DriveParentsIntegrationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DriveParentsIntegrationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DriveParentsApiMethod.class).getName();
+
+    // TODO provide parameter values for delete
+    @Ignore
+    @Test
+    public void testDelete() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.parentId", null);
+
+        final com.google.api.services.drive.Drive.Parents.Delete result = requestBodyAndHeaders("direct://DELETE", null, headers);
+
+        assertNotNull("delete result", result);
+        LOG.debug("delete: " + result);
+    }
+
+    // TODO provide parameter values for get
+    @Ignore
+    @Test
+    public void testGet() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.parentId", null);
+
+        final com.google.api.services.drive.Drive.Parents.Get result = requestBodyAndHeaders("direct://GET", null, headers);
+
+        assertNotNull("get result", result);
+        LOG.debug("get: " + result);
+    }
+
+    // TODO provide parameter values for insert
+    @Ignore
+    @Test
+    public void testInsert() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is com.google.api.services.drive.model.ParentReference
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Parents.Insert result = requestBodyAndHeaders("direct://INSERT", null, headers);
+
+        assertNotNull("insert result", result);
+        LOG.debug("insert: " + result);
+    }
+
+    // TODO provide parameter values for list
+    @Ignore
+    @Test
+    public void testList() throws Exception {
+        // using String message body for single parameter "fileId"
+        final com.google.api.services.drive.Drive.Parents.List result = requestBody("direct://LIST", null);
+
+        assertNotNull("list result", result);
+        LOG.debug("list: " + result);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                // test route for delete
+                from("direct://DELETE")
+                  .to("google-drive://" + PATH_PREFIX + "/delete");
+
+                // test route for get
+                from("direct://GET")
+                  .to("google-drive://" + PATH_PREFIX + "/get");
+
+                // test route for insert
+                from("direct://INSERT")
+                  .to("google-drive://" + PATH_PREFIX + "/insert");
+
+                // test route for list
+                from("direct://LIST")
+                  .to("google-drive://" + PATH_PREFIX + "/list?inBody=fileId");
+
+            }
+        };
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/301153bb/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePermissionsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePermissionsIntegrationTest.java b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePermissionsIntegrationTest.java
new file mode 100644
index 0000000..743522b
--- /dev/null
+++ b/components/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePermissionsIntegrationTest.java
@@ -0,0 +1,170 @@
+/*
+ * Camel Api Route test generated by camel-component-util-maven-plugin
+ * Generated on: Thu Jul 03 16:04:18 NDT 2014
+ */
+package org.apache.camel.component.google.drive;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
+import org.apache.camel.component.google.drive.internal.DrivePermissionsApiMethod;
+
+/**
+ * Test class for com.google.api.services.drive.Drive$Permissions APIs.
+ * TODO Move the file to src/test/java, populate parameter values, and remove @Ignore annotations.
+ * The class source won't be generated again if the generator MOJO finds it under src/test/java.
+ */
+public class DrivePermissionsIntegrationTest extends AbstractGoogleDriveTestSupport {
+
+    private static final Logger LOG = LoggerFactory.getLogger(DrivePermissionsIntegrationTest.class);
+    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DrivePermissionsApiMethod.class).getName();
+
+    // TODO provide parameter values for delete
+    @Ignore
+    @Test
+    public void testDelete() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.permissionId", null);
+
+        final com.google.api.services.drive.Drive.Permissions.Delete result = requestBodyAndHeaders("direct://DELETE", null, headers);
+
+        assertNotNull("delete result", result);
+        LOG.debug("delete: " + result);
+    }
+
+    // TODO provide parameter values for get
+    @Ignore
+    @Test
+    public void testGet() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.permissionId", null);
+
+        final com.google.api.services.drive.Drive.Permissions.Get result = requestBodyAndHeaders("direct://GET", null, headers);
+
+        assertNotNull("get result", result);
+        LOG.debug("get: " + result);
+    }
+
+    // TODO provide parameter values for getIdForEmail
+    @Ignore
+    @Test
+    public void testGetIdForEmail() throws Exception {
+        // using String message body for single parameter "email"
+        final com.google.api.services.drive.Drive.Permissions.GetIdForEmail result = requestBody("direct://GETIDFOREMAIL", null);
+
+        assertNotNull("getIdForEmail result", result);
+        LOG.debug("getIdForEmail: " + result);
+    }
+
+    // TODO provide parameter values for insert
+    @Ignore
+    @Test
+    public void testInsert() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is com.google.api.services.drive.model.Permission
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Permissions.Insert result = requestBodyAndHeaders("direct://INSERT", null, headers);
+
+        assertNotNull("insert result", result);
+        LOG.debug("insert: " + result);
+    }
+
+    // TODO provide parameter values for list
+    @Ignore
+    @Test
+    public void testList() throws Exception {
+        // using String message body for single parameter "fileId"
+        final com.google.api.services.drive.Drive.Permissions.List result = requestBody("direct://LIST", null);
+
+        assertNotNull("list result", result);
+        LOG.debug("list: " + result);
+    }
+
+    // TODO provide parameter values for patch
+    @Ignore
+    @Test
+    public void testPatch() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.permissionId", null);
+        // parameter type is com.google.api.services.drive.model.Permission
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Permissions.Patch result = requestBodyAndHeaders("direct://PATCH", null, headers);
+
+        assertNotNull("patch result", result);
+        LOG.debug("patch: " + result);
+    }
+
+    // TODO provide parameter values for update
+    @Ignore
+    @Test
+    public void testUpdate() throws Exception {
+        final Map<String, Object> headers = new HashMap<String, Object>();
+        // parameter type is String
+        headers.put("CamelGoogleDrive.fileId", null);
+        // parameter type is String
+        headers.put("CamelGoogleDrive.permissionId", null);
+        // parameter type is com.google.api.services.drive.model.Permission
+        headers.put("CamelGoogleDrive.content", null);
+
+        final com.google.api.services.drive.Drive.Permissions.Update result = requestBodyAndHeaders("direct://UPDATE", null, headers);
+
+        assertNotNull("update result", result);
+        LOG.debug("update: " + result);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            public void configure() {
+                // test route for delete
+                from("direct://DELETE")
+                  .to("google-drive://" + PATH_PREFIX + "/delete");
+
+                // test route for get
+                from("direct://GET")
+                  .to("google-drive://" + PATH_PREFIX + "/get");
+
+                // test route for getIdForEmail
+                from("direct://GETIDFOREMAIL")
+                  .to("google-drive://" + PATH_PREFIX + "/getIdForEmail?inBody=email");
+
+                // test route for insert
+                from("direct://INSERT")
+                  .to("google-drive://" + PATH_PREFIX + "/insert");
+
+                // test route for list
+                from("direct://LIST")
+                  .to("google-drive://" + PATH_PREFIX + "/list?inBody=fileId");
+
+                // test route for patch
+                from("direct://PATCH")
+                  .to("google-drive://" + PATH_PREFIX + "/patch");
+
+                // test route for update
+                from("direct://UPDATE")
+                  .to("google-drive://" + PATH_PREFIX + "/update");
+
+            }
+        };
+    }
+}


Mime
View raw message