@Test
public void testInvokeLater() {

    assertThat(SwingUtilities.isEventDispatchThread(), is(false));
    
    Callable<Void> callable = new Callable<Void>() {
        @Override
        public Void call() throws Exception {
            assertThat(SwingUtilities.isEventDispatchThread(), is(true));
            
            //wait a long time
            Thread.sleep(1000);
            
            return null;
        }
    };
    
    long start = System.currentTimeMillis();
    FutureTask<Void> task = SwingXUtilities.invokeLater(callable);
    assertThat((System.currentTimeMillis() - start) < 100, is(true));
}