### Question:
ReadRowsHelper { public Iterator<ReadRowsResponse> readRows() { Iterator<ReadRowsResponse> serverResponses = fetchResponses(request); return new ReadRowsIterator(this, request.getReadPositionBuilder(), serverResponses); } ReadRowsHelper(BigQueryStorageClient client, ReadRowsRequest.Builder request, int maxReadRowsRetries); Iterator<ReadRowsResponse> readRows();  }### Answer:
@Test void testNoFailures() { BigQueryStorageClient client = mock(BigQueryStorageClient.class); ReadRowsRequest.Builder request = newRequest(); MockResponsesBatch batch1 = new MockResponsesBatch(); batch1.addResponse(ReadRowsResponse.newBuilder().setRowCount(10).build()); batch1.addResponse(ReadRowsResponse.newBuilder().setRowCount(11).build()); List<ReadRowsResponse> responses = ImmutableList.copyOf( new MockReadRowsHelper(client, request, 3, ImmutableList.of(batch1)) .readRows()); assertThat(responses.size()).isEqualTo(2); assertThat(responses.stream().mapToLong(ReadRowsResponse::getRowCount).sum()).isEqualTo(21); }
@Test void testRetryOfSingleFailure() { BigQueryStorageClient client = mock(BigQueryStorageClient.class); ReadRowsRequest.Builder request = newRequest(); MockResponsesBatch batch1 = new MockResponsesBatch(); batch1.addResponse(ReadRowsResponse.newBuilder().setRowCount(10).build()); batch1.addException(new StatusRuntimeException(Status.INTERNAL.withDescription( "Received unexpected EOS on DATA frame from server."))); MockResponsesBatch batch2 = new MockResponsesBatch(); batch2.addResponse(ReadRowsResponse.newBuilder().setRowCount(11).build()); List<ReadRowsResponse> responses = ImmutableList.copyOf( new MockReadRowsHelper(client, request, 3, ImmutableList.of(batch1, batch2)) .readRows()); assertThat(responses.size()).isEqualTo(2); assertThat(responses.stream().mapToLong(ReadRowsResponse::getRowCount).sum()).isEqualTo(21); }