### Question:
NotificationPressedInterceptorCounter { void updateCounter(@NonNull final Activity activity, final boolean increment) { if (activity instanceof OnNotificationPressedInterceptor) { count += increment ? 1 : -1; } } NotificationPressedInterceptorCounter(); boolean hasActiveInterceptors();  }### Answer:
@Test public void updateCounter() throws Exception { final Activity mockInterceptedActivity = mock(TestActivity.class); final Activity mockNormalActivity = mock(Activity.class); notificationPressedInterceptorCounter.updateCounter(mockNormalActivity, true); assertThat(notificationPressedInterceptorCounter.hasActiveInterceptors(), equalTo(false)); notificationPressedInterceptorCounter.updateCounter(mockInterceptedActivity, true); assertThat(notificationPressedInterceptorCounter.hasActiveInterceptors(), equalTo(true)); notificationPressedInterceptorCounter.updateCounter(mockInterceptedActivity, false); assertThat(notificationPressedInterceptorCounter.hasActiveInterceptors(), equalTo(false)); }