EventTracker { boolean isRunning(){ return callbacksIsRegistered; } EventTracker(Context context, List<EventTrackingService> services, boolean wifiOnly); void start();  }
@Test public void testIsRunning(){ Application mockApplication = mock(Application.class); EventTracker eventTracker = new EventTracker(mockApplication, null, false); assertFalse(eventTracker.isRunning()); eventTracker.start(); assertTrue(eventTracker.isRunning()); eventTracker.stop(); assertFalse(eventTracker.isRunning()); }