@Test
public void testTruncateInvalidTx() throws Exception {

  Transaction tx1 = txClient.startLong();
  Transaction tx2 = txClient.startShort();
  txClient.invalidate(tx1.getTransactionId());
  txClient.invalidate(tx2.getTransactionId());
  Assert.assertEquals(2, txClient.getInvalidSize());
  TransactionAdmin txAdmin = new TransactionAdmin(new PrintStream(System.out), new PrintStream(System.err));
  int status = txAdmin.doMain(new String[]{"--truncate-invalid-tx", String.valueOf(tx2.getTransactionId())}, conf);
  Assert.assertEquals(0, status);
  Assert.assertEquals(1, txClient.getInvalidSize());
}