TickerThread extends Thread { @Override public void run() { try { while ( !isInterrupted() ) { EventQueue.invokeLater( update ); Thread.sleep( UPDATE_INTERVAL ); } } catch ( InterruptedException e ) { } } TickerThread( AttackModel model ); @Override void run();  }
@Test public void testRun() { AttackModel model = new AttackModel(); TickerThread instance = new TickerThread( model ); assertNotNull( "New Clock Thread should be created and running", instance ); instance.interrupt(); }