@Test
public void testRetry() throws Exception {

  MutateRowsRequest request = createRequest(2);
  RetryingMutateRowsOperation underTest = createOperation(request);
  ListenableFuture<?> future = underTest.getAsyncResult();
  MutateRowsRequest retryRequest = createRequest(request.getEntries(1));
  send(underTest, OK, DEADLINE_EXCEEDED);
  checkExecutor(1);
  Assert.assertEquals(retryRequest, underTest.getRetryRequest());
  for (int i = 1; i < 6; i++) {
    send(underTest, DEADLINE_EXCEEDED);
    checkExecutor(i + 1);
    Assert.assertEquals(retryRequest, underTest.getRetryRequest());
  }
  send(underTest, OK);
  checkResponse(future, createResponse(OK, OK));
}