@@ -0,0 +1,1137 @@
+import java.util.concurrent.TimeUnit;%0Aimport java.util.concurrent.locks.Condition;%0Aimport java.util.concurrent.locks.ReentrantLock;%0A%0Apublic class TestConditionAwait %7B%0A%0A%09public static void main(String%5B%5D args) throws InterruptedException %7B%0A%09%09System.out.println(%229223372036854775807%22);%0A%09%09System.out.println(Long.MAX_VALUE);%0A%09%09%0A%09%09final ReentrantLock lock = new ReentrantLock();%0A%09%09Condition condition = lock.newCondition();%0A%09%09lock.lock();%0A%09%09%0A%09%09new Thread()%7B%0A%09%09%09public void run() %7B%0A%09%09%09%09try %7B%0A%09%09%09%09%09Thread.sleep(5000);%0A%09%09%09%09%7D catch (InterruptedException e) %7B%0A%09%09%09%09%09e.printStackTrace();%0A%09%09%09%09%7D%0A%09%09%09%09%0A%09%09%09%09lock.lock();%0A%09%09%09%09System.out.println(%22Inner thread lock count before signal %22 + lock.getHoldCount());%0A%09%09%09%09condition.signalAll();%0A%09%09%09%09lock.unlock();%0A%09%09%09%09System.out.println(%22Inner thread lock count %22 + lock.getHoldCount());%0A%09%09%09%7D;%0A%09%09%7D.start();%0A%09%09%0A%0A%09%09%0A%09%09System.out.println(%22Before%22);%0A%09%09System.out.println(%22Main thread lock count before await %22 + lock.getHoldCount());%0A%09%09condition.await(Long.MAX_VALUE, TimeUnit.MILLISECONDS);%0A%09%09System.out.println(%22After%22);%0A%09%09lock.unlock();%0A%09%09System.out.println(%22Main thread lock count %22 + lock.getHoldCount());%0A%09%7D%0A%0A%7D%0A

Test class for condition