@@ -0,0 +1,1196 @@
+package org.scm4j.releaser;%0D%0A%0D%0Aimport static org.junit.Assert.assertEquals;%0D%0Aimport static org.junit.Assert.assertFalse;%0D%0Aimport static org.junit.Assert.assertTrue;%0D%0A%0D%0Aimport java.util.Collections;%0D%0Aimport java.util.concurrent.ForkJoinPool;%0D%0Aimport java.util.concurrent.ForkJoinWorkerThread;%0D%0A%0D%0Aimport org.junit.Test;%0D%0Aimport org.scm4j.releaser.exceptions.EReleaserException;%0D%0A%0D%0Apublic class UtilsTest %7B%0D%0A%09%0D%0A%09@Test%0D%0A%09public void testAsyncParallelism() %7B%0D%0A%09%09ForkJoinPool pool = new ForkJoinPool(1);%0D%0A%09%09Utils.async(Collections.nCopies(3, 1), (x) -%3E %7B%0D%0A%09%09%09assertFalse(Thread.currentThread() instanceof ForkJoinWorkerThread);%0D%0A%09%09%09System.out.println(x);%0D%0A%09%09%7D, pool);%0D%0A%09%09%0D%0A%09%09pool = new ForkJoinPool(2);%0D%0A%09%09Utils.async(Collections.nCopies(3, 1), (x) -%3E %7B%0D%0A%09%09%09assertTrue(Thread.currentThread() instanceof ForkJoinWorkerThread);%0D%0A%09%09%09System.out.println(x);%0D%0A%09%09%7D, pool);%0D%0A%09%7D%0D%0A%09%0D%0A%09@Test%0D%0A%09public void testAsyncExceptions() %7B%0D%0A%09%09ForkJoinPool pool = new ForkJoinPool(2);%0D%0A%09%09RuntimeException e = new RuntimeException(%22test exception%22);%0D%0A%09%09try %7B%0D%0A%09%09%09Utils.async(Collections.nCopies(3, 1), (x) -%3E %7B%0D%0A%09%09%09%09throw e;%0D%0A%09%09%09%7D, pool);%0D%0A%09%09%7D catch (EReleaserException e1) %7B%0D%0A%09%09%09assertEquals(e, e1.getCause());%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%7D%0D%0A

test update