diff --git a/google-cloud-workflow-executions/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionsClient.java b/google-cloud-workflow-executions/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionsClient.java index 15e8eb41..557dc8b8 100644 --- a/google-cloud-workflow-executions/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionsClient.java +++ b/google-cloud-workflow-executions/src/main/java/com/google/cloud/workflows/executions/v1beta/ExecutionsClient.java @@ -274,6 +274,13 @@ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest re * *
{@code
    * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+   *   ListExecutionsRequest request =
+   *       ListExecutionsRequest.newBuilder()
+   *           .setParent(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setView(ExecutionView.forNumber(0))
+   *           .build();
    *   while (true) {
    *     ListExecutionsResponse response = executionsClient.listExecutionsCallable().call(request);
    *     for (Execution element : response.getResponsesList()) {
diff --git a/google-cloud-workflow-executions/src/test/java/com/google/cloud/workflows/executions/v1beta/MockExecutionsImpl.java b/google-cloud-workflow-executions/src/test/java/com/google/cloud/workflows/executions/v1beta/MockExecutionsImpl.java
index 8571efb9..fb79a7d4 100644
--- a/google-cloud-workflow-executions/src/test/java/com/google/cloud/workflows/executions/v1beta/MockExecutionsImpl.java
+++ b/google-cloud-workflow-executions/src/test/java/com/google/cloud/workflows/executions/v1beta/MockExecutionsImpl.java
@@ -61,7 +61,7 @@ public void reset() {
   @Override
   public void listExecutions(
       ListExecutionsRequest request, StreamObserver responseObserver) {
-    Object response = responses.remove();
+    Object response = responses.poll();
     if (response instanceof ListExecutionsResponse) {
       requests.add(request);
       responseObserver.onNext(((ListExecutionsResponse) response));
@@ -73,7 +73,7 @@ public void listExecutions(
           new IllegalArgumentException(
               String.format(
                   "Unrecognized response type %s for method ListExecutions, expected %s or %s",
-                  response.getClass().getName(),
+                  response == null ? "null" : response.getClass().getName(),
                   ListExecutionsResponse.class.getName(),
                   Exception.class.getName())));
     }
@@ -82,7 +82,7 @@ public void listExecutions(
   @Override
   public void createExecution(
       CreateExecutionRequest request, StreamObserver responseObserver) {
-    Object response = responses.remove();
+    Object response = responses.poll();
     if (response instanceof Execution) {
       requests.add(request);
       responseObserver.onNext(((Execution) response));
@@ -94,7 +94,7 @@ public void createExecution(
           new IllegalArgumentException(
               String.format(
                   "Unrecognized response type %s for method CreateExecution, expected %s or %s",
-                  response.getClass().getName(),
+                  response == null ? "null" : response.getClass().getName(),
                   Execution.class.getName(),
                   Exception.class.getName())));
     }
@@ -103,7 +103,7 @@ public void createExecution(
   @Override
   public void getExecution(
       GetExecutionRequest request, StreamObserver responseObserver) {
-    Object response = responses.remove();
+    Object response = responses.poll();
     if (response instanceof Execution) {
       requests.add(request);
       responseObserver.onNext(((Execution) response));
@@ -115,7 +115,7 @@ public void getExecution(
           new IllegalArgumentException(
               String.format(
                   "Unrecognized response type %s for method GetExecution, expected %s or %s",
-                  response.getClass().getName(),
+                  response == null ? "null" : response.getClass().getName(),
                   Execution.class.getName(),
                   Exception.class.getName())));
     }
@@ -124,7 +124,7 @@ public void getExecution(
   @Override
   public void cancelExecution(
       CancelExecutionRequest request, StreamObserver responseObserver) {
-    Object response = responses.remove();
+    Object response = responses.poll();
     if (response instanceof Execution) {
       requests.add(request);
       responseObserver.onNext(((Execution) response));
@@ -136,7 +136,7 @@ public void cancelExecution(
           new IllegalArgumentException(
               String.format(
                   "Unrecognized response type %s for method CancelExecution, expected %s or %s",
-                  response.getClass().getName(),
+                  response == null ? "null" : response.getClass().getName(),
                   Execution.class.getName(),
                   Exception.class.getName())));
     }
diff --git a/synth.metadata b/synth.metadata
index 8173c160..39294118 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,15 +4,15 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-workflow-executions.git",
-        "sha": "d1bf19039d9e8afead2aa8b1a2ff7dbe43dedb14"
+        "sha": "24dfe9af70b8820d3778f25611fcbcf19068c7f7"
       }
     },
     {
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "0e915217fb5261c1e57bfaf0e16ee5c7feaaba89",
-        "internalRef": "361377784"
+        "sha": "1305ca41d554eb0725237561e34129373bb8cbc1",
+        "internalRef": "362856902"
       }
     },
     {