@Test public void shouldStopObservingConnectivity() {

  // given
  final NetworkObservingStrategy strategy = new PreLollipopNetworkObservingStrategy();
  final Context context = RuntimeEnvironment.application.getApplicationContext();
  final Observable<Connectivity> observable = strategy.observeNetworkConnectivity(context);
  final TestObserver<Connectivity> observer = new TestObserver<>();
  // when
  observable.subscribe(observer);
  observer.dispose();
  // then
  assertThat(observer.isDisposed()).isTrue();
}