diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITGrpcInterceptorTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITGrpcInterceptorTest.java index 0e52171b8d..f7c9d1f153 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITGrpcInterceptorTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITGrpcInterceptorTest.java @@ -86,7 +86,8 @@ public void grpcStorageOptions_allowSpecifyingInterceptor() throws Exception { System.out.println("requestParams = " + requestParams); String expected = String.format("project=projects/%s", options.getProjectId()); - assertThat(requestParams).contains(expected); + String expectedEncoded = String.format("project=projects%%2F%s", options.getProjectId()); + assertThat(requestParams).containsAnyOf(expected, expectedEncoded); } private static final class Interceptor implements ClientInterceptor {