public abstract boolean shouldRetry(Context context);
@Test
  public void testCustomRetryPolicy() {
    InsertRetryPolicy policy = new RetryAllExceptInvalidQuery();
    assertTrue(
        policy.shouldRetry(new Context(generateErrorAmongMany(5, "timeout", "unavailable"))));
    assertTrue(policy.shouldRetry(new Context(generateErrorAmongMany(5, "timeout", "invalid"))));
    assertFalse(
        policy.shouldRetry(new Context(generateErrorAmongMany(5, "timeout", "invalidQuery"))));
    assertTrue(
        policy.shouldRetry(new Context(generateErrorAmongMany(5, "timeout", "notImplemented"))));
  }