TransactionModificationLock { void unlock(final long transactionID) { sync.release( transactionID ); } TransactionModificationLock(final boolean exclusiveMode);   }
@Test(expected = IllegalMonitorStateException.class) public void canGetExceptionTryingToUnlockFromParallelThread() throws Exception { final TransactionModificationContext c1 = new TransactionModificationContext(); final TransactionModificationLock lock = new TransactionModificationLock( true ); throw JVMUtil.runAndGetExecutionException( new Runnable() { @Override public void run() { lock.unlock( c1.getTransactionId() ); } } ); }