class PreLollipopNetworkObservingStrategy implements NetworkObservingStrategy {

  @Override public void onError(final String message, final Exception exception) {
    Log.e(LOG_TAG, message, exception);
  }

}

class PreLollipopNetworkObservingStrategyTest {

  @Rule public MockitoRule rule;
  @Spy private PreLollipopNetworkObservingStrategy strategy;
  @Mock private BroadcastReceiver broadcastReceiver;

  @Test public void shouldCallOnError() {

    // given
    final String message = "error message";
    final Exception exception = new Exception();

    // when
    strategy.onError(message, exception);

    // then
    verify(strategy, times(1)).onError(message, exception);
  }

}