### Question:
VCellThreadChecker { public static void checkSwingInvocation() { if (guiThreadChecker == null){ System.out.println("!!!!!!!!!!!!!! --VCellThreadChecker.setGUIThreadChecker() not set"); Thread.dumpStack(); }else if (!guiThreadChecker.isEventDispatchThread()) { System.out.println("!!!!!!!!!!!!!! --calling swing from non-swing thread-----"); Thread.dumpStack(); } }  static void setGUIThreadChecker(GUIThreadChecker argGuiThreadChecker); static void checkRemoteInvocation(); static void checkSwingInvocation(); static void checkCpuIntensiveInvocation();  }### Answer:
@Test public void swingCheck( ) throws InvocationTargetException, InterruptedException { SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { VCellThreadChecker.checkSwingInvocation(); } }); checkQuiet( ); }