@@ -0,0 +1,910 @@
+package org.genericsystem.cv.utils;%0A%0Aimport java.util.concurrent.Executors;%0Aimport java.util.concurrent.ScheduledExecutorService;%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport org.testng.annotations.Test;%0A%0A@Test%0Apublic class ExecutorsTest %7B%0A%0A%09private LongTaskOverrider taskOverrider = new LongTaskOverrider();%0A%0A%09@Test%0A%09void testExecutor000() %7B%0A%09%09ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();%0A%09%09int%5B%5D i = new int%5B%5D %7B 0 %7D;%0A%09%09Runnable command = () -%3E %7B%0A%09%09%09final int j = i%5B0%5D;%0A%09%09%09taskOverrider.schedule(() -%3E %7B%0A%09%09%09%09try %7B%0A%09%09%09%09%09Thread.sleep(200);%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%09System.out.println(i%5B0%5D + %22 %22 + j);%0A%09%09%09%7D);%0A%09%09%09i%5B0%5D++;%0A%09%09%7D;%0A%0A%09%09executor.scheduleAtFixedRate(command, 0, 100, TimeUnit.MILLISECONDS);%0A%0A%09%09try %7B%0A%09%09%09Thread.sleep(3000);%0A%09%09%7D catch (InterruptedException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09executor.shutdown();%0A%09%7D%0A%0A%7D%0A

Test executor with Long task overrider