TestTailerListener listener = new TestTailerListener();
int delay = 100;
int idle = 50; // allow time for thread to work
tailer = new Tailer(file, listener, delay, false);
Executor exec = new ScheduledThreadPoolExecutor(1);
exec.execute(tailer);
Thread.sleep(idle);
tailer.stop();
tailer=null;
Thread.sleep(delay+idle);
assertNull("Should not generate Exception", listener.exception);