You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2014/12/05 00:17:55 UTC

jclouds-labs-google git commit: New MockTests: Network, Operation, Region, Route, Snapshot

Repository: jclouds-labs-google
Updated Branches:
  refs/heads/master 073265570 -> 3e1d027b5


New MockTests: Network, Operation, Region, Route, Snapshot


Project: http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/commit/3e1d027b
Tree: http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/tree/3e1d027b
Diff: http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/diff/3e1d027b

Branch: refs/heads/master
Commit: 3e1d027b5070280fe422c1c5f1f0b8127e133e2c
Parents: 0732655
Author: Daniel Broudy <br...@google.com>
Authored: Wed Dec 3 16:11:10 2014 -0800
Committer: Ignasi Barrera <na...@apache.org>
Committed: Fri Dec 5 00:11:05 2014 +0100

----------------------------------------------------------------------
 .../features/NetworkApiExpectTest.java          | 153 -----------
 .../features/NetworkApiMockTest.java            |  87 ++++++
 .../features/OperationApiExpectTest.java        | 274 -------------------
 .../features/OperationApiMockTest.java          | 166 +++++++++++
 .../features/RegionApiExpectTest.java           |  89 ------
 .../features/RegionApiMockTest.java             |  63 +++++
 .../features/RouteApiExpectTest.java            | 162 -----------
 .../features/RouteApiMockTest.java              |  98 +++++++
 .../features/SnapshotApiExpectTest.java         |  89 ------
 .../features/SnapshotApiMockTest.java           |  79 ++++++
 .../parse/ParseGlobalOperationListTest.java     |   7 +-
 .../parse/ParseNetworkListTest.java             |   7 +-
 .../parse/ParseNetworkTest.java                 |   7 +-
 .../parse/ParseRegionListTest.java              |  11 +-
 .../parse/ParseRegionTest.java                  |  11 +-
 .../parse/ParseRouteListTest.java               |  13 +-
 .../parse/ParseRouteTest.java                   |  11 +-
 .../parse/ParseSnapshotListTest.java            |  11 +-
 .../parse/ParseSnapshotTest.java                |   9 +-
 19 files changed, 559 insertions(+), 788 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiExpectTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiExpectTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiExpectTest.java
deleted file mode 100644
index a4996bc..0000000
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiExpectTest.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * 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.jclouds.googlecomputeengine.features;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.AssertJUnit.assertNull;
-
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineExpectTest;
-import org.jclouds.googlecomputeengine.parse.ParseNetworkListTest;
-import org.jclouds.googlecomputeengine.parse.ParseNetworkTest;
-import org.jclouds.googlecomputeengine.parse.ParseOperationTest;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "NetworkApiExpectTest")
-public class NetworkApiExpectTest extends BaseGoogleComputeEngineExpectTest<GoogleComputeEngineApi> {
-
-   public static final HttpRequest GET_NETWORK_REQUEST = HttpRequest
-           .builder()
-           .method("GET")
-           .endpoint(BASE_URL + "/party/global/networks/jclouds-test")
-           .addHeader("Accept", "application/json")
-           .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public static final HttpResponse GET_NETWORK_RESPONSE = HttpResponse.builder().statusCode(200)
-           .payload(staticPayloadFromResource("/network_get.json")).build();
-
-   public void testGetNetworkResponseIs2xx() throws Exception {
-
-      NetworkApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, GET_NETWORK_REQUEST, GET_NETWORK_RESPONSE).networks();
-
-      assertEquals(api.get("jclouds-test"),
-              new ParseNetworkTest().expected());
-   }
-
-   public void testGetNetworkResponseIs4xx() throws Exception {
-      HttpRequest get = HttpRequest
-              .builder()
-              .method("GET")
-              .endpoint(BASE_URL + "/party/global/networks/jclouds-test")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse response = HttpResponse.builder().statusCode(404).build();
-
-      NetworkApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, get, response).networks();
-
-      assertNull(api.get("jclouds-test"));
-   }
-
-   public void testInsertNetworkResponseIs2xx() {
-      HttpRequest insert = HttpRequest
-              .builder()
-              .method("POST")
-              .endpoint(BASE_URL + "/party/global/networks")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN)
-              .payload(payloadFromResourceWithContentType("/network_insert.json", MediaType.APPLICATION_JSON))
-              .build();
-
-      HttpResponse insertNetworkResponse = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/operation.json")).build();
-
-      NetworkApi api = requestsSendResponses(requestForScopes(COMPUTE_SCOPE),
-              TOKEN_RESPONSE, insert,
-              insertNetworkResponse).networks();
-
-      assertEquals(api.createInIPv4Range("test-network", "10.0.0.0/8"), new ParseOperationTest().expected());
-   }
-
-   public void testDeleteNetworkResponseIs2xx() {
-      HttpRequest delete = HttpRequest
-              .builder()
-              .method("DELETE")
-              .endpoint(BASE_URL + "/party/global/networks/jclouds-test")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse deleteResponse = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/operation.json")).build();
-
-      NetworkApi api = requestsSendResponses(requestForScopes(COMPUTE_SCOPE),
-              TOKEN_RESPONSE, delete, deleteResponse).networks();
-
-      assertEquals(api.delete("jclouds-test"),
-              new ParseOperationTest().expected());
-   }
-
-   public void testDeleteNetworkResponseIs4xx() {
-      HttpRequest delete = HttpRequest
-              .builder()
-              .method("DELETE")
-              .endpoint(BASE_URL + "/party/global/networks/jclouds-test")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse deleteResponse = HttpResponse.builder().statusCode(404).build();
-
-      NetworkApi api = requestsSendResponses(requestForScopes(COMPUTE_SCOPE),
-              TOKEN_RESPONSE, delete, deleteResponse).networks();
-
-      assertNull(api.delete("jclouds-test"));
-   }
-
-   HttpRequest list = HttpRequest
-         .builder()
-         .method("GET")
-         .endpoint(BASE_URL + "/party/global/networks")
-         .addHeader("Accept", "application/json")
-         .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public void testListNetworksResponseIs2xx() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/network_list.json")).build();
-
-      NetworkApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, list, response).networks();
-
-      assertEquals(api.list().next(),
-              new ParseNetworkListTest().expected());
-   }
-
-   public void listEmpty() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/list_empty.json")).build();
-
-      NetworkApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE), TOKEN_RESPONSE, list,
-            response).networks();
-
-      assertFalse(api.list().hasNext());
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiMockTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiMockTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiMockTest.java
new file mode 100644
index 0000000..240ae07
--- /dev/null
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/NetworkApiMockTest.java
@@ -0,0 +1,87 @@
+/*
+ * 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.jclouds.googlecomputeengine.features;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+
+import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineApiMockTest;
+import org.jclouds.googlecomputeengine.parse.ParseNetworkListTest;
+import org.jclouds.googlecomputeengine.parse.ParseNetworkTest;
+import org.jclouds.googlecomputeengine.parse.ParseOperationTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "NetworkApiMockTest", singleThreaded = true)
+public class NetworkApiMockTest extends BaseGoogleComputeEngineApiMockTest {
+
+   public void get() throws Exception {
+      server.enqueue(jsonResponse("/network_get.json"));
+
+      assertEquals(networkApi().get("jclouds-test"),
+            new ParseNetworkTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/global/networks/jclouds-test");
+   }
+
+   public void get_4xx() throws Exception {
+      server.enqueue(response404());
+
+      assertNull(networkApi().get("jclouds-test"));
+      assertSent(server, "GET", "/projects/party/global/networks/jclouds-test");
+   }
+
+   public void insert() throws Exception {
+      server.enqueue(jsonResponse("/operation.json"));
+
+      assertEquals(networkApi().createInIPv4Range("test-network", "10.0.0.0/8"), new ParseOperationTest().expected(url("/projects")));
+      assertSent(server, "POST", "/projects/party/global/networks",
+            stringFromResource("/network_insert.json"));
+   }
+
+   public void delete() throws Exception {
+      server.enqueue(jsonResponse("/operation.json"));
+
+      assertEquals(networkApi().delete("jclouds-test"),
+            new ParseOperationTest().expected(url("/projects")));
+      assertSent(server, "DELETE", "/projects/party/global/networks/jclouds-test");
+   }
+
+   public void delete_4xx() throws Exception {
+      server.enqueue(response404());
+
+      assertNull(networkApi().delete("jclouds-test"));
+      assertSent(server, "DELETE", "/projects/party/global/networks/jclouds-test");
+   }
+
+   public void list() throws Exception {
+      server.enqueue(jsonResponse("/network_list.json"));
+
+      assertEquals(networkApi().list().next(), new ParseNetworkListTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/global/networks");
+   }
+
+   public void list_empty() throws Exception {
+      server.enqueue(jsonResponse("/list_empty.json"));
+
+      assertFalse(networkApi().list().hasNext());
+      assertSent(server, "GET", "/projects/party/global/networks");
+   }
+
+   NetworkApi networkApi(){
+      return api().networks();
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/OperationApiExpectTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/OperationApiExpectTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/OperationApiExpectTest.java
deleted file mode 100644
index 5b5f4e1..0000000
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/OperationApiExpectTest.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * 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.jclouds.googlecomputeengine.features;
-
-import static org.jclouds.googlecomputeengine.options.ListOptions.Builder.filter;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNull;
-
-import org.jclouds.googlecloud.domain.ForwardingListPage;
-import org.jclouds.googlecloud.domain.ListPage;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.Operation;
-import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineExpectTest;
-import org.jclouds.googlecomputeengine.parse.ParseGlobalOperationListTest;
-import org.jclouds.googlecomputeengine.parse.ParseGlobalOperationTest;
-import org.jclouds.googlecomputeengine.parse.ParseRegionOperationTest;
-import org.jclouds.googlecomputeengine.parse.ParseZoneOperationTest;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-import com.google.common.collect.ImmutableList;
-
-@Test(groups = "unit", testName = "OperationApiExpectTest")
-public class OperationApiExpectTest extends BaseGoogleComputeEngineExpectTest<GoogleComputeEngineApi> {
-
-   private static final String OPERATIONS_URL_PREFIX = BASE_URL + "/party/global/operations";
-   private static final String REGION_OPERATIONS_URL_PREFIX = BASE_URL + "/party/regions/us-central1/operations";
-   private static final String ZONE_OPERATIONS_URL_PREFIX = BASE_URL + "/party/zones/us-central1-a/operations";
-
-   public static final HttpRequest GET_GLOBAL_OPERATION_REQUEST = HttpRequest
-           .builder()
-           .method("GET")
-           .endpoint(OPERATIONS_URL_PREFIX + "/operation-1354084865060")
-           .addHeader("Accept", "application/json")
-           .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public static final HttpResponse GET_GLOBAL_OPERATION_RESPONSE = HttpResponse.builder().statusCode(200)
-           .payload(staticPayloadFromResource("/global_operation.json")).build();
-
-   public void get() throws Exception {
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, GET_GLOBAL_OPERATION_REQUEST, GET_GLOBAL_OPERATION_RESPONSE).operations();
-
-      assertEquals(api.get(GET_GLOBAL_OPERATION_REQUEST.getEndpoint()),
-              new ParseGlobalOperationTest().expected());
-   }
-
-   public void getResponseIs4xx() throws Exception {
-
-      HttpResponse response = HttpResponse.builder().statusCode(404).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, GET_GLOBAL_OPERATION_REQUEST, response).operations();
-
-      assertNull(api.get(GET_GLOBAL_OPERATION_REQUEST.getEndpoint()));
-   }
-
-   public void delete() throws Exception {
-      HttpRequest delete = HttpRequest
-              .builder()
-              .method("DELETE")
-              .endpoint(OPERATIONS_URL_PREFIX + "/operation-1352178598164-4cdcc9d031510-4aa46279")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse response = HttpResponse.builder().statusCode(204).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_SCOPE),
-              TOKEN_RESPONSE, delete, response).operations();
-
-      api.delete(delete.getEndpoint());
-   }
-
-   public void deleteResponseIs4xx() throws Exception {
-      HttpRequest delete = HttpRequest
-              .builder()
-              .method("DELETE")
-              .endpoint(OPERATIONS_URL_PREFIX + "/operation-1352178598164-4cdcc9d031510-4aa46279")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse response = HttpResponse.builder().statusCode(404).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_SCOPE),
-              TOKEN_RESPONSE, delete, response).operations();
-
-      api.delete(delete.getEndpoint());
-   }
-
-   HttpRequest list = HttpRequest
-         .builder()
-         .method("GET")
-         .endpoint(OPERATIONS_URL_PREFIX)
-         .addHeader("Accept", "application/json")
-         .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public void list() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/global_operation_list.json")).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, list, response).operations();
-
-      assertEquals(api.list().next(), new ParseGlobalOperationListTest().expected());
-   }
-
-   public void listEmpty() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/list_empty.json")).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-            TOKEN_RESPONSE, list, response).operations();
-
-      assertFalse(api.list().hasNext());
-   }
-
-   public void listPageWithOptions() {
-      HttpRequest get = HttpRequest
-              .builder()
-              .method("GET")
-              .endpoint(OPERATIONS_URL_PREFIX +
-                      "?pageToken=CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcG" +
-                      "VyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz&" +
-                      "filter=" +
-                      "status%20eq%20done&" +
-                      "maxResults=3")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/global_operation_list.json")).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, get, response).operations();
-
-      assertEquals(api.listPage("CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcGVyYXRpb24tMTM1Mj" +
-              "I0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz",
-              filter("status eq done").maxResults(3)),
-              new ParseGlobalOperationListTest().expected());
-   }
-
-   private ListPage<Operation> regionList() {
-      return ForwardingListPage.create( //
-            ImmutableList.of(new ParseRegionOperationTest().expected()), // items
-            null // nextPageToken
-      );
-   }
-
-   HttpRequest listInRegion = HttpRequest
-         .builder()
-         .method("GET")
-         .endpoint(REGION_OPERATIONS_URL_PREFIX)
-         .addHeader("Accept", "application/json")
-         .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public void listInRegion() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/region_operation_list.json")).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-            TOKEN_RESPONSE, listInRegion, response).operations();
-
-      assertEquals(api.listInRegion("us-central1").next(), regionList());
-   }
-
-   public void listInRegionEmpty() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/list_empty.json")).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-            TOKEN_RESPONSE, listInRegion, response).operations();
-
-      assertFalse(api.listInRegion("us-central1").hasNext());
-   }
-
-   public void listPageInRegion() {
-      HttpRequest get = HttpRequest
-            .builder()
-            .method("GET")
-            .endpoint(REGION_OPERATIONS_URL_PREFIX +
-                  "?pageToken=CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcG" +
-                  "VyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz&" +
-                  "filter=" +
-                  "status%20eq%20done&" +
-                  "maxResults=3")
-            .addHeader("Accept", "application/json")
-            .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/region_operation_list.json")).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-            TOKEN_RESPONSE, get, response).operations();
-
-      assertEquals(api.listPageInRegion("us-central1",
-                  "CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcGVyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz",
-                  filter("status eq done").maxResults(3)).toString(), regionList().toString());
-   }
-
-   private ListPage<Operation> zoneList() {
-      return ForwardingListPage.create( //
-            ImmutableList.of(new ParseZoneOperationTest().expected()), // items
-            null // nextPageToken
-      );
-   }
-
-   HttpRequest listInZone = HttpRequest
-         .builder()
-         .method("GET")
-         .endpoint(ZONE_OPERATIONS_URL_PREFIX)
-         .addHeader("Accept", "application/json")
-         .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public void listInZone() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/zone_operation_list.json")).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-            TOKEN_RESPONSE, listInZone, response).operations();
-
-      assertEquals(api.listInZone("us-central1-a").next(), zoneList());
-   }
-
-   public void listInZoneEmpty() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/list_empty.json")).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-            TOKEN_RESPONSE, listInZone, response).operations();
-
-      assertFalse(api.listInZone("us-central1-a").hasNext());
-   }
-
-   public void listPageInZone() {
-      HttpRequest get = HttpRequest
-            .builder()
-            .method("GET")
-            .endpoint(ZONE_OPERATIONS_URL_PREFIX +
-                  "?pageToken=CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcG" +
-                  "VyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz&" +
-                  "filter=" +
-                  "status%20eq%20done&" +
-                  "maxResults=3")
-            .addHeader("Accept", "application/json")
-            .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/zone_operation_list.json")).build();
-
-      OperationApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-            TOKEN_RESPONSE, get, response).operations();
-
-      assertEquals(api.listPageInZone("us-central1-a",
-            "CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcGVyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz",
-            filter("status eq done").maxResults(3)).toString(), zoneList().toString());
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/OperationApiMockTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/OperationApiMockTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/OperationApiMockTest.java
new file mode 100644
index 0000000..3c4caa8
--- /dev/null
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/OperationApiMockTest.java
@@ -0,0 +1,166 @@
+/*
+ * 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.jclouds.googlecomputeengine.features;
+
+import static org.jclouds.googlecomputeengine.options.ListOptions.Builder.filter;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+
+import java.net.URI;
+
+import org.jclouds.googlecloud.domain.ForwardingListPage;
+import org.jclouds.googlecloud.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Operation;
+import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineApiMockTest;
+import org.jclouds.googlecomputeengine.parse.ParseGlobalOperationListTest;
+import org.jclouds.googlecomputeengine.parse.ParseGlobalOperationTest;
+import org.jclouds.googlecomputeengine.parse.ParseRegionOperationTest;
+import org.jclouds.googlecomputeengine.parse.ParseZoneOperationTest;
+import org.testng.annotations.Test;
+
+import com.google.common.collect.ImmutableList;
+import com.squareup.okhttp.mockwebserver.MockResponse;
+
+@Test(groups = "unit", testName = "OperationApiMockTest", singleThreaded = true)
+public class OperationApiMockTest extends BaseGoogleComputeEngineApiMockTest {
+
+   public void get() throws Exception {
+      server.enqueue(jsonResponse("/global_operation.json"));
+
+      assertEquals(operationApi().get(URI.create(url("/projects/party/global/operations/operation-1354084865060"))),
+            new ParseGlobalOperationTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/global/operations/operation-1354084865060");
+   }
+
+   public void get_4xx() throws Exception {
+      server.enqueue(response404());
+
+      assertNull(operationApi().get(URI.create(url("/projects/party/global/operations/operation-1354084865060"))));
+      assertSent(server, "GET", "/projects/party/global/operations/operation-1354084865060");
+   }
+
+   public void delete() throws Exception {
+      server.enqueue(new MockResponse().setBody(""));
+
+      operationApi().delete(URI.create(url("/projects/party/global/operations/operation-1352178598164-4cdcc9d031510-4aa46279")));
+      assertSent(server, "DELETE", "/projects/party/global/operations/operation-1352178598164-4cdcc9d031510-4aa46279");
+   }
+
+   public void delete_4xx() throws Exception {
+      server.enqueue(response404());
+
+      operationApi().delete(URI.create(url("/projects/party/global/operations/operation-1352178598164-4cdcc9d031510-4aa46279")));
+      assertSent(server, "DELETE", "/projects/party/global/operations/operation-1352178598164-4cdcc9d031510-4aa46279");
+   }
+
+   public void list() throws Exception {
+      server.enqueue(jsonResponse("/global_operation_list.json"));
+
+      assertEquals(operationApi().list().next(), new ParseGlobalOperationListTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/global/operations");
+   }
+
+   public void list_empty() throws Exception {
+      server.enqueue(jsonResponse("/list_empty.json"));
+
+      assertFalse(operationApi().list().hasNext());
+      assertSent(server, "GET", "/projects/party/global/operations");
+   }
+
+   public void listPage_options() throws Exception {
+      server.enqueue(jsonResponse("/global_operation_list.json"));
+
+      assertEquals(operationApi().listPage("CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcGVyYXRpb24tMTM1Mj" +
+            "I0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz",
+            filter("status eq done").maxResults(3)), new ParseGlobalOperationListTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/global/operations?pageToken=CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcG" +
+                      "VyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz&" +
+                      "filter=status%20eq%20done&maxResults=3");
+   }
+
+   private ListPage<Operation> regionList() {
+      return ForwardingListPage.create( //
+            ImmutableList.of(new ParseRegionOperationTest().expected(url("/projects"))), // items
+            null // nextPageToken
+      );
+   }
+
+   public void listInRegion() throws Exception {
+      server.enqueue(jsonResponse("/region_operation_list.json"));
+
+      assertEquals(operationApi().listInRegion("us-central1").next(), regionList());
+      assertSent(server, "GET", "/projects/party/regions/us-central1/operations");
+   }
+
+   public void listInRegion_empty() throws Exception {
+      server.enqueue(jsonResponse("/list_empty.json"));
+
+      assertFalse(operationApi().listInRegion("us-central1").hasNext());
+      assertSent(server, "GET", "/projects/party/regions/us-central1/operations");
+   }
+
+   public void listPageInRegion() throws Exception {
+      server.enqueue(jsonResponse("/region_operation_list.json"));
+
+      assertEquals(operationApi().listPageInRegion("us-central1", "CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcGVyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz",
+            filter("status eq done").maxResults(3)).toString(), regionList().toString());
+      assertSent(server, "GET", "/projects/party/regions/us-central1/operations?pageToken=CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcG" +
+                  "VyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz&" +
+                  "filter=" +
+                  "status%20eq%20done&" +
+                  "maxResults=3");
+   }
+
+   private ListPage<Operation> zoneList() {
+      return ForwardingListPage.create( //
+            ImmutableList.of(new ParseZoneOperationTest().expected(url("/projects"))), // items
+            null // nextPageToken
+      );
+   }
+
+   public void listInZone() throws Exception {
+      server.enqueue(jsonResponse("/zone_operation_list.json"));
+
+      assertEquals(operationApi().listInZone("us-central1-a").next(), zoneList());
+      assertSent(server, "GET", "/projects/party/zones/us-central1-a/operations");
+   }
+
+   public void listInZone_empty() throws Exception {
+      server.enqueue(jsonResponse("/list_empty.json"));
+
+      assertFalse(operationApi().listInZone("us-central1-a").hasNext());
+      assertSent(server, "GET", "/projects/party/zones/us-central1-a/operations");
+   }
+
+   public void listPageInZone() throws Exception {
+      server.enqueue(jsonResponse("/zone_operation_list.json"));
+
+      assertEquals(operationApi().listPageInZone("us-central1-a",
+            "CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcGVyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz",
+            filter("status eq done").maxResults(3)).toString(), zoneList().toString());
+      assertSent(server, "GET", "/projects/party/zones/us-central1-a/operations?pageToken=CglPUEVSQVRJT04SOzU5MDQyMTQ4Nzg1Mi5vcG" +
+                  "VyYXRpb24tMTM1MjI0NDI1ODAzMC00Y2RkYmU2YTJkNmIwLWVkMzIyMzQz&" +
+                  "filter=" +
+                  "status%20eq%20done&" +
+                  "maxResults=3");
+   }
+
+   OperationApi operationApi(){
+      return api().operations();
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiExpectTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiExpectTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiExpectTest.java
deleted file mode 100644
index 86273da..0000000
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiExpectTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.jclouds.googlecomputeengine.features;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNull;
-
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineExpectTest;
-import org.jclouds.googlecomputeengine.parse.ParseRegionListTest;
-import org.jclouds.googlecomputeengine.parse.ParseRegionTest;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "RegionApiExpectTest")
-public class RegionApiExpectTest extends BaseGoogleComputeEngineExpectTest<GoogleComputeEngineApi> {
-
-   public static final String REGIONS_URL_PREFIX = BASE_URL + "/party/regions";
-
-   public static final HttpRequest GET_REGION_REQ = HttpRequest
-           .builder()
-           .method("GET")
-           .endpoint(REGIONS_URL_PREFIX + "/us-central1")
-           .addHeader("Accept", "application/json")
-           .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public static final HttpRequest LIST_REGIONS_REQ = HttpRequest
-           .builder()
-           .method("GET")
-           .endpoint(REGIONS_URL_PREFIX)
-           .addHeader("Accept", "application/json")
-           .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public static final HttpResponse LIST_REGIONS_RESPONSE = HttpResponse.builder().statusCode(200)
-           .payload(staticPayloadFromResource("/region_list.json")).build();
-
-   public void testGetRegionResponseIs2xx() throws Exception {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/region_get.json")).build();
-
-      RegionApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, GET_REGION_REQ, response).regions();
-
-      assertEquals(api.get("us-central1"), new ParseRegionTest().expected());
-   }
-
-   public void testGetRegionResponseIs4xx() throws Exception {
-
-      HttpResponse response = HttpResponse.builder().statusCode(404).build();
-
-      RegionApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, GET_REGION_REQ, response).regions();
-
-      assertNull(api.get("us-central1"));
-   }
-
-   public void list() throws Exception {
-      RegionApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, LIST_REGIONS_REQ, LIST_REGIONS_RESPONSE).regions();
-
-      assertEquals(api.list().next(), new ParseRegionListTest().expected());
-   }
-
-   public void listEmpty() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/list_empty.json")).build();
-
-      RegionApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, LIST_REGIONS_REQ, response).regions();
-
-      assertFalse(api.list().hasNext());
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiMockTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiMockTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiMockTest.java
new file mode 100644
index 0000000..7312eca
--- /dev/null
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RegionApiMockTest.java
@@ -0,0 +1,63 @@
+/*
+ * 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.jclouds.googlecomputeengine.features;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+
+import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineApiMockTest;
+
+import org.jclouds.googlecomputeengine.parse.ParseRegionListTest;
+import org.jclouds.googlecomputeengine.parse.ParseRegionTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "RegionApiMockTest", singleThreaded = true)
+public class RegionApiMockTest extends BaseGoogleComputeEngineApiMockTest {
+
+   public void get() throws Exception {
+      server.enqueue(jsonResponse("/region_get.json"));
+
+      assertEquals(regionApi().get("us-central1"), new ParseRegionTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/regions/us-central1");
+   }
+
+   public void get_4xx() throws Exception {
+      server.enqueue(response404());
+
+      assertNull(regionApi().get("us-central1"));
+      assertSent(server, "GET", "/projects/party/regions/us-central1");
+   }
+
+   public void list() throws Exception {
+      server.enqueue(jsonResponse("/region_list.json"));
+
+      assertEquals(regionApi().list().next(), new ParseRegionListTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/regions");
+   }
+
+   public void list_empty() throws Exception {
+      server.enqueue(jsonResponse("/list_empty.json"));
+
+      assertFalse(regionApi().list().hasNext());
+      assertSent(server, "GET", "/projects/party/regions");
+   }
+
+   RegionApi regionApi() {
+      return api().regions();
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiExpectTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiExpectTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiExpectTest.java
deleted file mode 100644
index abeeb5f..0000000
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiExpectTest.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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.jclouds.googlecomputeengine.features;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.AssertJUnit.assertNull;
-
-import java.net.URI;
-
-import javax.ws.rs.core.MediaType;
-
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineExpectTest;
-import org.jclouds.googlecomputeengine.options.RouteOptions;
-import org.jclouds.googlecomputeengine.parse.ParseGlobalOperationTest;
-import org.jclouds.googlecomputeengine.parse.ParseRouteListTest;
-import org.jclouds.googlecomputeengine.parse.ParseRouteTest;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "RouteApiExpectTest")
-public class RouteApiExpectTest extends BaseGoogleComputeEngineExpectTest<GoogleComputeEngineApi> {
-
-   public void testGetRouteResponseIs2xx() throws Exception {
-      HttpRequest get = HttpRequest
-              .builder()
-              .method("GET")
-              .endpoint(BASE_URL + "/party/global/routes/default-route-c99ebfbed0e1f375")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/route_get.json")).build();
-
-      RouteApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, get, response).routes();
-
-      assertEquals(api.get("default-route-c99ebfbed0e1f375"),
-              new ParseRouteTest().expected());
-   }
-
-   public void testGetRouteResponseIs4xx() throws Exception {
-      HttpRequest get = HttpRequest
-              .builder()
-              .method("GET")
-              .endpoint(BASE_URL + "/party/global/routes/default-route-c99ebfbed0e1f375")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse response = HttpResponse.builder().statusCode(404).build();
-
-      RouteApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, get, response).routes();
-
-      assertNull(api.get("default-route-c99ebfbed0e1f375"));
-   }
-
-   public void testInsertRouteResponseIs2xx() {
-      HttpRequest insert = HttpRequest
-              .builder()
-              .method("POST")
-              .endpoint(BASE_URL + "/party/global/routes")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN)
-              .payload(payloadFromResourceWithContentType("/route_insert.json", MediaType.APPLICATION_JSON))
-              .build();
-
-      HttpResponse insertRouteResponse = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/global_operation.json")).build();
-
-      RouteApi api = requestsSendResponses(requestForScopes(COMPUTE_SCOPE),
-              TOKEN_RESPONSE, insert,
-              insertRouteResponse).routes();
-
-      assertEquals(api.createInNetwork("default-route-c99ebfbed0e1f375",
-              URI.create(BASE_URL + "/party/global/networks/default"),
-              new RouteOptions().addTag("fooTag")
-                      .addTag("barTag")
-                      .description("Default route to the virtual network.")
-              .destRange("10.240.0.0/16")
-              .priority(1000)
-              .nextHopNetwork(URI.create(BASE_URL + "/party/global/networks/default"))
-      ), new ParseGlobalOperationTest().expected());
-   }
-
-   public void testDeleteRouteResponseIs2xx() {
-      HttpRequest delete = HttpRequest
-              .builder()
-              .method("DELETE")
-              .endpoint(BASE_URL + "/party/global/routes/default-route-c99ebfbed0e1f375")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse deleteResponse = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/global_operation.json")).build();
-
-      RouteApi api = requestsSendResponses(requestForScopes(COMPUTE_SCOPE),
-              TOKEN_RESPONSE, delete, deleteResponse).routes();
-
-      assertEquals(api.delete("default-route-c99ebfbed0e1f375"),
-              new ParseGlobalOperationTest().expected());
-   }
-
-   public void testDeleteRouteResponseIs4xx() {
-      HttpRequest delete = HttpRequest
-              .builder()
-              .method("DELETE")
-              .endpoint(BASE_URL + "/party/global/routes/default-route-c99ebfbed0e1f375")
-              .addHeader("Accept", "application/json")
-              .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-      HttpResponse deleteResponse = HttpResponse.builder().statusCode(404).build();
-
-      RouteApi api = requestsSendResponses(requestForScopes(COMPUTE_SCOPE),
-              TOKEN_RESPONSE, delete, deleteResponse).routes();
-
-      assertNull(api.delete("default-route-c99ebfbed0e1f375"));
-   }
-
-   HttpRequest list = HttpRequest
-         .builder()
-         .method("GET")
-         .endpoint(BASE_URL + "/party/global/routes")
-         .addHeader("Accept", "application/json")
-         .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public void list() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/route_list.json")).build();
-
-      RouteApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, list, response).routes();
-
-      assertEquals(api.list().next(), new ParseRouteListTest().expected());
-   }
-
-   public void listEmpty() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/list_empty.json")).build();
-
-      RouteApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, list, response).routes();
-
-      assertFalse(api.list().hasNext());
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiMockTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiMockTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiMockTest.java
new file mode 100644
index 0000000..c9d94b9
--- /dev/null
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/RouteApiMockTest.java
@@ -0,0 +1,98 @@
+/*
+ * 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.jclouds.googlecomputeengine.features;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+
+import java.net.URI;
+
+import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineApiMockTest;
+import org.jclouds.googlecomputeengine.options.RouteOptions;
+import org.jclouds.googlecomputeengine.parse.ParseGlobalOperationTest;
+import org.jclouds.googlecomputeengine.parse.ParseRouteListTest;
+import org.jclouds.googlecomputeengine.parse.ParseRouteTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "RouteApiMockTest", singleThreaded = true)
+public class RouteApiMockTest extends BaseGoogleComputeEngineApiMockTest {
+
+   public void get() throws Exception {
+      server.enqueue(jsonResponse("/route_get.json"));
+
+      assertEquals(routeApi().get("default-route-c99ebfbed0e1f375"),
+            new ParseRouteTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/global/routes/default-route-c99ebfbed0e1f375");
+   }
+
+   public void get_4xx() throws Exception {
+      server.enqueue(response404());
+
+      assertNull(routeApi().get("default-route-c99ebfbed0e1f375"));
+      assertSent(server, "GET", "/projects/party/global/routes/default-route-c99ebfbed0e1f375");
+   }
+
+   public void insert() throws Exception {
+      server.enqueue(jsonResponse("/global_operation.json"));
+
+      assertEquals(routeApi().createInNetwork("default-route-c99ebfbed0e1f375",
+            URI.create(url("/projects/party/global/networks/default")),
+            new RouteOptions().addTag("fooTag")
+                    .addTag("barTag")
+                    .description("Default route to the virtual network.")
+            .destRange("10.240.0.0/16")
+            .priority(1000)
+            .nextHopNetwork(URI.create(url("/projects/party/global/networks/default")))),
+            new ParseGlobalOperationTest().expected(url("/projects")));
+      assertSent(server, "POST", "/projects/party/global/routes",
+            stringFromResource("/route_insert.json"));
+   }
+
+   public void delete() throws Exception {
+      server.enqueue(jsonResponse("/global_operation.json"));
+
+      assertEquals(routeApi().delete("default-route-c99ebfbed0e1f375"),
+            new ParseGlobalOperationTest().expected(url("/projects")));
+      assertSent(server, "DELETE", "/projects/party/global/routes/default-route-c99ebfbed0e1f375");
+   }
+
+   public void delete_4xx() throws Exception {
+      server.enqueue(response404());
+
+      assertNull(routeApi().delete("default-route-c99ebfbed0e1f375"));
+      assertSent(server, "DELETE", "/projects/party/global/routes/default-route-c99ebfbed0e1f375");
+   }
+
+   public void list() throws Exception {
+      server.enqueue(jsonResponse("/route_list.json"));
+
+      assertEquals(routeApi().list().next(), new ParseRouteListTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/global/routes");
+   }
+
+   public void list_empty() throws Exception {
+      server.enqueue(jsonResponse("/list_empty.json"));
+
+      assertFalse(routeApi().list().hasNext());
+      assertSent(server, "GET", "/projects/party/global/routes");
+   }
+
+   RouteApi routeApi() {
+      return api().routes();
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiExpectTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiExpectTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiExpectTest.java
deleted file mode 100644
index 2465809..0000000
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiExpectTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.jclouds.googlecomputeengine.features;
-
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertNull;
-
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineExpectTest;
-import org.jclouds.googlecomputeengine.parse.ParseSnapshotListTest;
-import org.jclouds.googlecomputeengine.parse.ParseSnapshotTest;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.HttpResponse;
-import org.testng.annotations.Test;
-
-@Test(groups = "unit", testName = "SnapshotApiExpectTest")
-public class SnapshotApiExpectTest extends BaseGoogleComputeEngineExpectTest<GoogleComputeEngineApi> {
-
-   public static final String SNAPSHOT_URL_PREFIX = BASE_URL + "/party/global/snapshots";
-
-   public static final HttpRequest GET_SNAPSHOT_REQ = HttpRequest
-           .builder()
-           .method("GET")
-           .endpoint(SNAPSHOT_URL_PREFIX + "/test-snap")
-           .addHeader("Accept", "application/json")
-           .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public static final HttpRequest LIST_SNAPSHOTS_REQ = HttpRequest
-           .builder()
-           .method("GET")
-           .endpoint(SNAPSHOT_URL_PREFIX)
-           .addHeader("Accept", "application/json")
-           .addHeader("Authorization", "Bearer " + TOKEN).build();
-
-   public static final HttpResponse LIST_SNAPSHOTS_RESPONSE = HttpResponse.builder().statusCode(200)
-           .payload(staticPayloadFromResource("/snapshot_list.json")).build();
-
-   public void testGetSnapshotResponseIs2xx() throws Exception {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-              .payload(payloadFromResource("/snapshot_get.json")).build();
-
-      SnapshotApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, GET_SNAPSHOT_REQ, response).snapshots();
-
-      assertEquals(api.get("test-snap"),
-              new ParseSnapshotTest().expected());
-   }
-
-   public void testGetSnapshotResponseIs4xx() throws Exception {
-      HttpResponse response = HttpResponse.builder().statusCode(404).build();
-
-      SnapshotApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, GET_SNAPSHOT_REQ, response).snapshots();
-
-      assertNull(api.get("test-snap"));
-   }
-
-   public void list() throws Exception {
-      SnapshotApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, LIST_SNAPSHOTS_REQ, LIST_SNAPSHOTS_RESPONSE).snapshots();
-
-      assertEquals(api.list().next(), new ParseSnapshotListTest().expected());
-   }
-
-   public void listEmpty() {
-      HttpResponse response = HttpResponse.builder().statusCode(200)
-            .payload(payloadFromResource("/list_empty.json")).build();
-
-      SnapshotApi api = requestsSendResponses(requestForScopes(COMPUTE_READONLY_SCOPE),
-              TOKEN_RESPONSE, LIST_SNAPSHOTS_REQ, response).snapshots();
-
-      assertFalse(api.list().hasNext());
-   }
-}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiMockTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiMockTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiMockTest.java
new file mode 100644
index 0000000..9379f7a
--- /dev/null
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/features/SnapshotApiMockTest.java
@@ -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.
+ */
+package org.jclouds.googlecomputeengine.features;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNull;
+
+import org.jclouds.googlecomputeengine.internal.BaseGoogleComputeEngineApiMockTest;
+import org.jclouds.googlecomputeengine.parse.ParseGlobalOperationTest;
+import org.jclouds.googlecomputeengine.parse.ParseSnapshotListTest;
+import org.jclouds.googlecomputeengine.parse.ParseSnapshotTest;
+import org.testng.annotations.Test;
+
+@Test(groups = "unit", testName = "SnapshotApiMockTest", singleThreaded = true)
+public class SnapshotApiMockTest extends BaseGoogleComputeEngineApiMockTest {
+
+   public void get() throws Exception {
+      server.enqueue(jsonResponse("/snapshot_get.json"));
+
+      assertEquals(snapshotApi().get("test-snap"),
+            new ParseSnapshotTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/global/snapshots/test-snap");
+   }
+
+   public void get_4xx() throws Exception {
+      server.enqueue(response404());
+
+      assertNull(snapshotApi().get("test-snap"));
+      assertSent(server, "GET", "/projects/party/global/snapshots/test-snap");
+   }
+
+   public void delete() throws Exception {
+      server.enqueue(jsonResponse("/global_operation.json"));
+
+      assertEquals(snapshotApi().delete("test-snap"),
+            new ParseGlobalOperationTest().expected(url("/projects")));
+      assertSent(server, "DELETE", "/projects/party/global/snapshots/test-snap");
+   }
+
+   public void delete_4xx() throws Exception {
+      server.enqueue(response404());
+
+      assertNull(snapshotApi().delete("test-snap"));
+      assertSent(server, "DELETE", "/projects/party/global/snapshots/test-snap");
+   }
+
+   public void list() throws Exception {
+      server.enqueue(jsonResponse("/snapshot_list.json"));
+
+      assertEquals(snapshotApi().list().next(), new ParseSnapshotListTest().expected(url("/projects")));
+      assertSent(server, "GET", "/projects/party/global/snapshots");
+   }
+
+   public void list_empty() throws Exception {
+      server.enqueue(jsonResponse("/list_empty.json"));
+
+      assertFalse(snapshotApi().list().hasNext());
+      assertSent(server, "GET", "/projects/party/global/snapshots");
+   }
+
+   SnapshotApi snapshotApi() {
+      return api().snapshots();
+   }
+}

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseGlobalOperationListTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseGlobalOperationListTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseGlobalOperationListTest.java
index d071a48..1a837ea 100644
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseGlobalOperationListTest.java
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseGlobalOperationListTest.java
@@ -38,8 +38,13 @@ public class ParseGlobalOperationListTest extends BaseGoogleComputeEngineParseTe
 
    @Override @Consumes(APPLICATION_JSON)
    public ListPage<Operation> expected() {
+      return expected(BASE_URL);
+   }
+
+   @Consumes(APPLICATION_JSON)
+   public ListPage<Operation> expected(String baseUrl) {
       return ForwardingListPage.create( //
-            ImmutableList.of(new ParseGlobalOperationTest().expected()), // items
+            ImmutableList.of(new ParseGlobalOperationTest().expected(baseUrl)), // items
             null // nextPageToken
       );
    }

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkListTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkListTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkListTest.java
index fdb8e9f..f6d92fa 100644
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkListTest.java
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkListTest.java
@@ -38,8 +38,13 @@ public class ParseNetworkListTest extends BaseGoogleComputeEngineParseTest<ListP
 
    @Override @Consumes(APPLICATION_JSON)
    public ListPage<Network> expected() {
+      return expected(BASE_URL);
+   }
+
+   @Consumes(APPLICATION_JSON)
+   public ListPage<Network> expected(String baseUrl) {
       return ForwardingListPage.create( //
-            ImmutableList.of(new ParseNetworkTest().expected()), // items
+            ImmutableList.of(new ParseNetworkTest().expected(baseUrl)), // items
             null // nextPageToken
       );
    }

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkTest.java
index 310b5ca..5b92ed3 100644
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkTest.java
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseNetworkTest.java
@@ -36,9 +36,14 @@ public class ParseNetworkTest extends BaseGoogleComputeEngineParseTest<Network>
 
    @Override @Consumes(APPLICATION_JSON)
    public Network expected() {
+      return expected(BASE_URL);
+   }
+
+   @Consumes(APPLICATION_JSON)
+   public Network expected(String baseUrl) {
       return Network.create( //
             "13024414170909937976", // id
-            URI.create(BASE_URL + "/party/networks/jclouds-test"), // selfLink
+            URI.create(baseUrl + "/party/networks/jclouds-test"), // selfLink
             "default", // name
             "Default network for the project", // description
             "10.0.0.0/8", // rangeIPv4

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java
index 846410a..5f83a5b 100644
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionListTest.java
@@ -41,14 +41,19 @@ public class ParseRegionListTest extends BaseGoogleComputeEngineParseTest<ListPa
 
    @Override @Consumes(APPLICATION_JSON)
    public ListPage<Region> expected() {
-      Region region1 = new ParseRegionTest().expected();
+      return expected(BASE_URL);
+   }
+
+   @Consumes(APPLICATION_JSON)
+   public ListPage<Region> expected(String baseUrl) {
+      Region region1 = new ParseRegionTest().expected(baseUrl);
       Region region2 = Region.create( //
             "6396763663251190992", // id
-            URI.create(BASE_URL + "/party/regions/us-central2"), // selfLink
+            URI.create(baseUrl + "/party/regions/us-central2"), // selfLink
             "us-central2", // name
             "us-central2", // description
             Region.Status.UP, // status
-            ImmutableList.of(URI.create(BASE_URL + "/party/zones/us-central2-a")), // zones
+            ImmutableList.of(URI.create(baseUrl + "/party/zones/us-central2-a")), // zones
             ImmutableList.of( //
                   Quota.create("INSTANCES", 0, 8), //
                   Quota.create("CPUS", 0, 8), //

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionTest.java
index fab2746..6a81a90 100644
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionTest.java
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRegionTest.java
@@ -39,15 +39,20 @@ public class ParseRegionTest extends BaseGoogleComputeEngineParseTest<Region> {
 
    @Override @Consumes(APPLICATION_JSON)
    public Region expected() {
+      return expected(BASE_URL);
+   }
+
+   @Consumes(APPLICATION_JSON)
+   public Region expected(String baseUrl) {
       return Region.create( //
             "12912210600542709766", // id
-            URI.create(BASE_URL + "/party/regions/us-central1"), // selfLink
+            URI.create(baseUrl + "/party/regions/us-central1"), // selfLink
             "us-central1", // name
             "us-central1", // description
             Region.Status.UP, // status
             ImmutableList.of(//
-                  URI.create(BASE_URL + "/party/zones/us-central1-a"),
-                  URI.create(BASE_URL + "/party/zones/us-central1-b")), // zones
+                  URI.create(baseUrl + "/party/zones/us-central1-a"),
+                  URI.create(baseUrl + "/party/zones/us-central1-b")), // zones
             ImmutableList.of( //
                   Quota.create("INSTANCES", 0, 8), //
                   Quota.create("CPUS", 0, 8), //

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteListTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteListTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteListTest.java
index 9eb18f9..8235ec7 100644
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteListTest.java
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteListTest.java
@@ -39,20 +39,25 @@ public class ParseRouteListTest extends BaseGoogleComputeEngineParseTest<ListPag
 
    @Override @Consumes(MediaType.APPLICATION_JSON)
    public ListPage<Route> expected() {
-      Route route1 = new ParseRouteTest().expected();
+      return expected(BASE_URL);
+   }
+
+   @Consumes(MediaType.APPLICATION_JSON)
+   public ListPage<Route> expected(String baseUrl) {
+      Route route1 = new ParseRouteTest().expected(baseUrl);
       Route route2 = Route.create( //
             "507025480040058551", // id
-            URI.create(BASE_URL + "/party/global/routes/default-route-fc92a41ecb5a8d17"), // selfLink
+            URI.create(baseUrl + "/party/global/routes/default-route-fc92a41ecb5a8d17"), // selfLink
             "default-route-fc92a41ecb5a8d17", // name
             "Default route to the Internet.", // description
-            URI.create(BASE_URL + "/party/global/networks/default"), // network
+            URI.create(baseUrl + "/party/global/networks/default"), // network
             null, // tags
             "0.0.0.0/0", // destRange
             1000, // priority
             null, // nextHopInstance
             null, // nextHopIp
             null, // nextHopNetwork
-            URI.create(BASE_URL + "/party/global/gateways/default-internet-gateway"), // nextHopGateway
+            URI.create(baseUrl + "/party/global/gateways/default-internet-gateway"), // nextHopGateway
             null // warnings
       );
       return ForwardingListPage.create( //

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteTest.java
index b5f0c42..0dd5ba4 100644
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteTest.java
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseRouteTest.java
@@ -38,18 +38,23 @@ public class ParseRouteTest extends BaseGoogleComputeEngineParseTest<Route> {
 
    @Override @Consumes(APPLICATION_JSON)
    public Route expected() {
+      return expected(BASE_URL);
+   }
+
+   @Consumes(APPLICATION_JSON)
+   public Route expected(String baseUrl) {
       return Route.create( //
             "7241926205630356071", // id
-            URI.create(BASE_URL + "/party/global/routes/default-route-c99ebfbed0e1f375"), // selfLink
+            URI.create(baseUrl + "/party/global/routes/default-route-c99ebfbed0e1f375"), // selfLink
             "default-route-c99ebfbed0e1f375", // name
             "Default route to the virtual network.", // description
-            URI.create(BASE_URL + "/party/global/networks/default"), // network
+            URI.create(baseUrl + "/party/global/networks/default"), // network
             ImmutableList.of("fooTag", "barTag"), // tags
             "10.240.0.0/16", // destRange
             1000, // priority
             null, // nextHopInstance
             null, // nextHopIp
-            URI.create(BASE_URL + "/party/global/networks/default"), // nextHopNetwork
+            URI.create(baseUrl + "/party/global/networks/default"), // nextHopNetwork
             null, // nextHopGateway
             null // warnings
       );

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotListTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotListTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotListTest.java
index 76e32e3..6cd691a 100644
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotListTest.java
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotListTest.java
@@ -40,15 +40,20 @@ public class ParseSnapshotListTest extends BaseGoogleComputeEngineParseTest<List
 
    @Override @Consumes(APPLICATION_JSON)
    public ListPage<Snapshot> expected() {
-      Snapshot snapshot1 = new ParseSnapshotTest().expected();
+      return expected(BASE_URL);
+   }
+
+   @Consumes(APPLICATION_JSON)
+   public ListPage<Snapshot> expected(String baseUrl) {
+      Snapshot snapshot1 = new ParseSnapshotTest().expected(baseUrl);
       Snapshot snapshot2 = Snapshot.create( //
             "13895715048576107883", // id
-            URI.create(BASE_URL + "/party/global/snapshots/test-snap2"), // selfLink
+            URI.create(baseUrl + "/party/global/snapshots/test-snap2"), // selfLink
             "test-snap2", // name
             "", // description
             10, // sizeGb
             "READY", // status
-            URI.create(BASE_URL + "/party/zones/us-central1-a/disks/testimage1"), // sourceDisk
+            URI.create(baseUrl + "/party/zones/us-central1-a/disks/testimage1"), // sourceDisk
             "8243603669926824540"// sourceDiskId
       );
       return ForwardingListPage.create( //

http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/3e1d027b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotTest.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotTest.java b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotTest.java
index 77f39e0..3247934 100644
--- a/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotTest.java
+++ b/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/parse/ParseSnapshotTest.java
@@ -36,14 +36,19 @@ public class ParseSnapshotTest extends BaseGoogleComputeEngineParseTest<Snapshot
 
    @Override @Consumes(APPLICATION_JSON)
    public Snapshot expected() {
+      return expected(BASE_URL);
+   }
+
+   @Consumes(APPLICATION_JSON)
+   public Snapshot expected(String baseUrl) {
       return Snapshot.create( //
             "9734455566806191190", // id
-            URI.create(BASE_URL + "/party/global/snapshots/test-snap"), // selfLink
+            URI.create(baseUrl + "/party/global/snapshots/test-snap"), // selfLink
             "test-snap", // name
             "", // description
             10, // sizeGb
             "READY", // status
-            URI.create(BASE_URL + "/party/zones/us-central1-a/disks/testimage1"), // sourceDisk
+            URI.create(baseUrl + "/party/zones/us-central1-a/disks/testimage1"), // sourceDisk
             "8243603669926824540"// sourceDiskId
       );
    }