@Test
public void testPrintUsage() throws Exception {

  ByteArrayOutputStream out = new ByteArrayOutputStream();
  ByteArrayOutputStream err = new ByteArrayOutputStream();
  TransactionAdmin txAdmin = new TransactionAdmin(new PrintStream(out), new PrintStream(err));
  int status = txAdmin.doMain(new String[0], conf);
  Assert.assertEquals(1, status);
  //noinspection ConstantConditions
  Assert.assertTrue(err.toString("UTF-8").startsWith("Usage:"));
  Assert.assertEquals(0, out.toByteArray().length);
}