LogListener { boolean isRunning(){ return !stop; } LogListener(Context context, List<LoggingService> services, boolean wifiOnly); void start();  }
@Test public void testIsRunning(){ LogListener logListener = new LogListener(null, null, false){ @Override protected void startMonitoringLogcat() { } }; assertFalse(logListener.isRunning()); logListener.start(); assertTrue(logListener.isRunning()); logListener.stop(); assertFalse(logListener.isRunning()); }