public void testSubmitRunnable2() throws Throwable {
  ExecutorService e=new ForkJoinPool(1);
  PoolCleaner cleaner=null;
  try {
    cleaner=cleaner(e);
    Future<String> future=e.submit(new NoOpRunnable(),TEST_STRING);
    assertSame(TEST_STRING,future.get());
    assertTrue(future.isDone());
    assertFalse(future.isCancelled());
  }
  finally {
    if (cleaner != null) {
      cleaner.close();
    }
  }
}

public void testSubmitRunnable2 ( ) throws Throwable { ExecutorService e = new ForkJoinPool ( 1 ) ; PoolCleaner cleaner = null ; try { cleaner = cleaner ( e ) ; Future < String > future = e . submit ( new NoOpRunnable ( ) , TEST_STRING ) ; assertSame ( TEST_STRING , future . get ( ) ) ; assertTrue ( future . isDone ( ) ) ; assertFalse ( future . isCancelled ( ) ) ; } finally { if ( cleaner != null ) { cleaner . close ( ) ; } } }
completed submit ( runnable , result ) returns result
