InsertRetryPolicy implements Serializable { public static InsertRetryPolicy alwaysRetry() { return new InsertRetryPolicy() { @Override public boolean shouldRetry(Context context) { return true; } }; }  abstract boolean shouldRetry(Context context); static InsertRetryPolicy neverRetry(); static InsertRetryPolicy alwaysRetry(); static InsertRetryPolicy retryTransientErrors();  }
@Test public void testAlwaysRetry() { assertTrue( InsertRetryPolicy.alwaysRetry() .shouldRetry(new Context(new TableDataInsertAllResponse.InsertErrors()))); }