@Test public void handler_handleMessage_withNonBaseEventTypeMessageShouldNotRecordOnAnyRecorders() throws Exception { Message message = new Message(); message.obj = mock(Activity.class); subject = new EventDispatcher(recorders, Looper.getMainLooper()); subject.getHandlerCallback().handleMessage(message); verify(mockEventRecorder1, never()).record(any(BaseEvent.class)); verify(mockEventRecorder2, never()).record(any(BaseEvent.class)); }
@VisibleForTesting Handler.Callback getHandlerCallback() { return mHandlerCallback; }
EventDispatcher { @VisibleForTesting Handler.Callback getHandlerCallback() { return mHandlerCallback; } }
EventDispatcher { @VisibleForTesting Handler.Callback getHandlerCallback() { return mHandlerCallback; } @VisibleForTesting  EventDispatcher(Iterable<EventRecorder> recorders, Looper looper); }
EventDispatcher { @VisibleForTesting Handler.Callback getHandlerCallback() { return mHandlerCallback; } @VisibleForTesting  EventDispatcher(Iterable<EventRecorder> recorders, Looper looper); void dispatch(BaseEvent event); }
EventDispatcher { @VisibleForTesting Handler.Callback getHandlerCallback() { return mHandlerCallback; } @VisibleForTesting  EventDispatcher(Iterable<EventRecorder> recorders, Looper looper); void dispatch(BaseEvent event);  }