@Test public void scheduleNextPoll_shouldPostDelayedThePollingRunnable() { when(handler.hasMessages(0)).thenReturn(false); subject.scheduleNextPoll(); verify(handler).postDelayed(any(ImpressionTracker.PollingRunnable.class), eq((long) 250)); }
@VisibleForTesting void scheduleNextPoll() { if (mPollHandler.hasMessages(0)) { return; } mPollHandler.postDelayed(mPollingRunnable, PERIOD); }
ImpressionTracker { @VisibleForTesting void scheduleNextPoll() { if (mPollHandler.hasMessages(0)) { return; } mPollHandler.postDelayed(mPollingRunnable, PERIOD); } }
ImpressionTracker { @VisibleForTesting void scheduleNextPoll() { if (mPollHandler.hasMessages(0)) { return; } mPollHandler.postDelayed(mPollingRunnable, PERIOD); } ImpressionTracker(@NonNull final Context context); @VisibleForTesting  ImpressionTracker(@NonNull final Map<View, NativeResponse> trackedViews,
            @NonNull final Map<View, TimestampWrapper<NativeResponse>> pollingViews,
            @NonNull final VisibilityChecker visibilityChecker,
            @NonNull final VisibilityTracker visibilityTracker,
            @NonNull final Handler handler); }
ImpressionTracker { @VisibleForTesting void scheduleNextPoll() { if (mPollHandler.hasMessages(0)) { return; } mPollHandler.postDelayed(mPollingRunnable, PERIOD); } ImpressionTracker(@NonNull final Context context); @VisibleForTesting  ImpressionTracker(@NonNull final Map<View, NativeResponse> trackedViews,
            @NonNull final Map<View, TimestampWrapper<NativeResponse>> pollingViews,
            @NonNull final VisibilityChecker visibilityChecker,
            @NonNull final VisibilityTracker visibilityTracker,
            @NonNull final Handler handler);  }
ImpressionTracker { @VisibleForTesting void scheduleNextPoll() { if (mPollHandler.hasMessages(0)) { return; } mPollHandler.postDelayed(mPollingRunnable, PERIOD); } ImpressionTracker(@NonNull final Context context); @VisibleForTesting  ImpressionTracker(@NonNull final Map<View, NativeResponse> trackedViews,
            @NonNull final Map<View, TimestampWrapper<NativeResponse>> pollingViews,
            @NonNull final VisibilityChecker visibilityChecker,
            @NonNull final VisibilityTracker visibilityTracker,
            @NonNull final Handler handler);   }