@Test(timeout = 60000)
 public void testConcurrentAllocation() throws Exception {
   String allcationPath = "/" + runtime.getMethodName();
   SimpleLedgerAllocator allocator = createAllocator(allcationPath);
   allocator.allocate();
   ZKTransaction txn1 = newTxn();
   Future<LedgerHandle> obtainFuture1 = allocator.tryObtain(txn1, NULL_LISTENER);
   ZKTransaction txn2 = newTxn();
   Future<LedgerHandle> obtainFuture2 = allocator.tryObtain(txn2, NULL_LISTENER);
   assertTrue(obtainFuture2.isDefined());
   assertTrue(obtainFuture2.isThrow());
   try {
     FutureUtils.result(obtainFuture2);
     fail(
         "Should fail the concurrent obtain since there is already a transaction obtaining the ledger handle");
   } catch (SimpleLedgerAllocator.ConcurrentObtainException cbe) {
     // expected
   }
 }