code: public static void main(final String[] args) throws InterruptedException {
      final Thread[] threads = new Thread[100];
      for (int i = 0; i < threads.length; i++) {
        threads[i] = new Thread(new Runnable(){
          public void run() {
            for (String str : args) {
              String interned = SynchronizedInterner.globalIntern(str);
              Thread.yield();
              if (interned != str)
                throw new AssertionError("Interning failed for " + str);
            }
          }
        });
      }
      for (Thread thread : threads) {
        thread.start();
      }
      for (Thread thread : threads) {
        thread.join();
      }
    }
docs: Test method: interns its arguments and says whether they == themselves.
  @throws InterruptedException