TransactionManager { public Transaction allocateTransaction() { while (!lock.tryLock()) { try { wait(); } catch (InterruptedException e) { throw new RuntimeException(e); } } try { File file = new File("data", UUID.randomUUID().toString()); try { saveTransactionCreationTimestamp(file); } catch (IOException e) { throw new RuntimeException("Failed to allocate transaction", e); } return new Transaction(file); } finally { lock.unlock(); } } TransactionManager(); void stop(); Transaction allocateTransaction();  }
@Test public void testAllocateTransaction() { fail("Not yet implemented"); }