@@ -0,0 +1,481 @@
+package com.atreceno.it.javanese.concurrency;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Apublic class ThresholdTest %7B%0A%0A%09@Test%0A%09public final void testTruncate() %7B%0A%09%09List%3CInteger%3E list = new ArrayList%3CInteger%3E(Arrays.asList(2, 4, 2, 5,%0A%09%09%09%091, 7, 9));%0A%09%09Threshold t = new Threshold(6, list);%0A%09%09t.truncate();%0A%09%09Assert.assertArrayEquals(new Integer%5B%5D %7B 7, 9 %7D,%0A%09%09%09%09list.toArray(new Integer%5B0%5D));%0A%09%7D%0A%0A%7D%0A

Add JUnit test for Threshold class