BalanceBooks implements Closeable { public BalanceBooks(int totalClients, int iterations) { this(totalClients, iterations, new ConfigurationFactory().get()); } BalanceBooks(int totalClients, int iterations);  BalanceBooks(int totalClients, int iterations, Configuration conf); void init(); void run(); boolean verify(); void close(); static void main(String[] args);  }
@Test public void testBalanceBooks() throws Exception { BalanceBooks bb = new BalanceBooks(5, 100, testUtil.getConfiguration()); try { bb.init(); bb.run(); assertTrue(bb.verify()); } finally { bb.close(); } }