ManagedThreadFactory implements ThreadFactory { public static Thread createThread(Runnable r) { return instance.newThread(r); } ManagedThreadFactory();  ManagedThreadFactory(String prefix); static Thread createThread(Runnable r); static Thread createThread(String name, Runnable r); @Override Thread newThread(Runnable runner); static void interruptManagedThreads(); static List<Runnable> shutdownQuietly(ExecutorService executor, TimeInterval timeout); static List<Runnable> shutdownQuietly(ExecutorService executor, long timeoutMs);  }
@Test public void testCreateThreadRunnable() { assertNotNull(ManagedThreadFactory.createThread(new StayingAlive())); }
@Test public void testCreateThreadStringRunnable() { assertNotNull(ManagedThreadFactory.createThread("myThreadName", new StayingAlive())); }