ThreadsEngine { private static void submitTopology(Topology topology) { ThreadsTopology tTopology = (ThreadsTopology) topology; tTopology.run(); }  static void setNumberOfThreads(int numThreads); static int getNumberOfThreads(); static ExecutorService getThreadWithIndex(int index); static void submitTopology(Topology topology, int numThreads); static void clearThreadPool();  }
@Test public void testSubmitTopology() { ThreadsEngine.submitTopology(topology, numThreads); new Verifications() {{ topology.run(); times=1; }}; assertEquals("Number of threads is not set correctly.", numThreads, ThreadsEngine.getNumberOfThreads(),0); }