App implements Runnable { public synchronized void f() { synchronized (lock) { int i = ThreadLocalRandom.current().nextInt(); System.out.println(i); numbers.add(i); } }  static void main(String[] args); @Override void run(); synchronized void f(); void g();  }
@Test public void testF() { app.f(); }