TransactionException extends StorageException { public boolean isConflict() { return isConflict(getCause()); } TransactionException(DatastoreException cause); @Override synchronized DatastoreException getCause(); boolean isConflict(); boolean isAlreadyExists(); boolean isNotFound();  }
@Test public void isConflict() { assertThat(transactionException(10, "", "").isConflict(), is(true)); assertThat(transactionException(1, "", "ABORTED").isConflict(), is(true)); assertThat(transactionException(1, "", "").isConflict(), is(false)); }