@Test public void shouldNotStopSensorsDuringASession() { sessionManager.startMobileSession(false); sessionManager.stopSensors(); verify(sessionManager.locationHelper, never()).stop(); verify(sessionManager.audioReader, never()).stop(); assertThat(sessionManager.isSessionStarted(), equalTo(true)); }
@Test public void shouldStopSensors() { sessionManager.startSensors(); sessionManager.stopSensors(); verify(sessionManager.audioReader).stop(); verify(sessionManager.locationHelper).stop(); assertThat(sessionManager.isSessionStarted(), equalTo(false)); }