@@ -0,0 +1,886 @@
+package ru.nsu.ccfit.bogush.threadpool;%0A%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.assertEquals;%0A%0Aclass ThreadPoolTest %7B%0A%09private ThreadPool threadPool = new ThreadPool(10);%0A%09private int cnt = 0;%0A%09private final Object lock = new Object();%0A%0A%09private void generateTasks(int numberOfTasks) throws InterruptedException %7B%0A%09%09for (int i = 0; i %3C numberOfTasks; i++) %7B%0A%09%09%09threadPool.addTask(new TestTask());%0A%09%09%7D%0A%09%7D%0A%0A%09@Test%0A%09void test1000Tasks() throws InterruptedException %7B%0A%09%09cnt = 0;%0A%09%09generateTasks(1000);%0A%09%09threadPool.start();%0A%09%09Thread.sleep(100);%0A%09%09assertEquals(1000, cnt);%0A%09%7D%0A%0A%09@Test%0A%09void test10000Tasks() throws InterruptedException %7B%0A%09%09cnt = 0;%0A%09%09generateTasks(10000);%0A%09%09threadPool.start();%0A%09%09Thread.sleep(100);%0A%09%09assertEquals(10000, cnt);%0A%09%7D%0A%0A%09private class TestTask implements Runnable %7B%0A%09%09@Override%0A%09%09public void run() %7B%0A%09%09%09synchronized (lock) %7B%0A%09%09%09%09cnt++;%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D

Implement ThreadPoolTest