@@ -0,0 +1,1922 @@
+package jdk.java.util;%0A%0Aimport java.util.concurrent.CountDownLatch;%0A%0Aimport org.junit.Test;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A/**%0A * java.util.CountDownLatch %ED%85%8C%EC%8A%A4%ED%8A%B8 %EC%BC%80%EC%9D%B4%EC%8A%A4%0A * %0A * @since 2018-01-24%0A * @author fixalot%0A */%0Apublic class CountDownLatchTest %7B%0A//%09@SuppressWarnings(%22unused%22)%0A%09private static final Logger logger = LoggerFactory.getLogger(CountDownLatchTest.class);%0A%0A%09/**%0A%09 * %EC%93%B0%EB%A0%88%EB%93%9C %EB%8F%99%EA%B8%B0%ED%99%94%EC%97%90 %EC%82%AC%EC%9A%A9%EB%90%98%EB%8A%94 %ED%81%B4%EB%9E%98%EC%8A%A4%EB%9D%BC%EB%8A%94%EB%8D%B0 %EB%8F%84%ED%86%B5 %EC%96%B4%EB%96%BB%EA%B2%8C %EC%93%B0%EB%8A%94%EA%B1%B4%EC%A7%80... %0A%09 * %3Ca href=%22http://sjava.net/2013/07/%25EC%259E%2590%25EB%25B0%2594-countdownlatch%25EB%25A5%25BC-%25EC%259D%25B4%25EC%259A%25A9%25ED%2595%259C-%25EB%258F%2599%25EC%258B%259C%25EC%2584%25B1-%25EB%2586%2592%25EC%259D%25B4%25EA%25B8%25B0/%22%3Ehttp://sjava.net/2013/07/%25EC%259E%2590%25EB%25B0%2594-countdownlatch%25EB%25A5%25BC-%25EC%259D%25B4%25EC%259A%25A9%25ED%2595%259C-%25EB%258F%2599%25EC%258B%259C%25EC%2584%25B1-%25EB%2586%2592%25EC%259D%25B4%25EA%25B8%25B0/%3C/a%3E%0A%09 * %0A%09 * @throws InterruptedException%0A%09 * @author fixalot%0A%09 */%0A%09@Test%0A%09public void printElapsedTime() throws InterruptedException %7B%0A%09%09final CountDownLatch latch = new CountDownLatch(1);%0A//%09%09boolean success = lacth.await(2000, TimeUnit.MILLISECONDS);%0A//%09%09Assert.assertTrue(success);%0A%09%09%0A%09%09long start = System.currentTimeMillis();%0A        for (long i = 0; i %3C 10; i++) %7B%0A            new Thread(new Worker(latch)).start();%0A        %7D%0A %0A        latch.await();%0A        long elapsedTime = System.currentTimeMillis() - start;%0A        logger.debug(%22testCountDownLatch elapsed time -%3E %22 + elapsedTime);%0A%09%7D%0A%09%0A    /**%0A     * Job %EC%93%B0%EB%A0%88%EB%93%9C%0A     */%0A    private static class Worker implements Runnable %7B%0A        private CountDownLatch latch;%0A %0A        public Worker(CountDownLatch latch) %7B%0A            this.latch = latch;%0A        %7D%0A %0A        @Override%0A        public void run() %7B%0A            try %7B%0A                Thread.sleep(1000);%0A            %7D catch (InterruptedException ex) %7B%0A                ex.printStackTrace();%0A            %7D finally %7B%0A                if (this.latch == null)%0A                    return;%0A %0A                latch.countDown();%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

add test unit