### Question:
FiamAnalyticsConnectorListener implements AnalyticsConnectorListener { @Override public void onMessageTriggered(int id, Bundle extras) { if (id == AnalyticsConstants.FIAM_ANALYTICS_CONNECTOR_LISTENER_EVENT_ID) { emitter.onNext(extras.getString("events")); } } FiamAnalyticsConnectorListener(FlowableEmitter<String> emitter); @Override void onMessageTriggered(int id, Bundle extras);  }### Answer:
@Test public void fiamAnalyticsConnectorListener_ok() throws Exception { FiamAnalyticsConnectorListener listener = new FiamAnalyticsConnectorListener(emitter); Bundle bundle = new Bundle(); String eventName = "event1"; bundle.putString("events", eventName); listener.onMessageTriggered( AnalyticsConstants.FIAM_ANALYTICS_CONNECTOR_LISTENER_EVENT_ID, bundle); verify(emitter, times(1)).onNext(eventName); }
@Test public void fiamAnalyticsConnectorListener_doesntTriggerOnOtherIds() throws Exception { FiamAnalyticsConnectorListener listener = new FiamAnalyticsConnectorListener(emitter); Bundle bundle = new Bundle(); String eventName = "event1"; bundle.putString(AnalyticsConstants.BUNDLE_EVENT_NAME_KEY, eventName); listener.onMessageTriggered(1, bundle); verify(emitter, never()).onNext(eventName); }