### Question:
DefaultEventClient implements InternalEventClient, JSONSerializable { @Override public void recordEvent(AnalyticsEvent event) { if (event == null) { Log.i(TAG, "The provided event was null"); return; } if (!context.getConfiguration().optBoolean(ANALYTICS_ENABLED, true) || !getAllowEventCollection()) return; InternalEvent eventToRecord = null; if (event instanceof InternalEvent) { eventToRecord = (InternalEvent) event; } else { Log.e(TAG, "Error recording event, this event cannot be stored"); return; } InternalEvent recordEvent = DefaultEvent.createFromEvent(context, sessionId, System.currentTimeMillis(), eventToRecord); notifyObservers(recordEvent); } DefaultEventClient(final AnalyticsContext context, final boolean allowEventCollection); @Override void recordEvent(AnalyticsEvent event); @Override AnalyticsEvent createEvent(String eventType); @Override AnalyticsEvent createEvent(String eventType, boolean applyGlobalAttributes); @Override InternalEvent createInternalEvent(String eventType, long sessionStart, Long sessionEnd,
            Long sessionDuration); @Override void submitEvents(); @Override void addGlobalAttribute(String attributeName, String attributeValue); @Override void addGlobalAttribute(String eventType, String attributeName, String attributeValue); @Override void addGlobalMetric(String metricName, Double metricValue); @Override void addGlobalMetric(String eventType, String metricName, Double metricValue); @Override void addEventObserver(EventObserver observer); @Override void removeEventObserver(EventObserver observer); @Override void removeGlobalAttribute(String attributeName); @Override void removeGlobalAttribute(String eventType, String attributeName); @Override void removeGlobalMetric(String metricName); @Override void removeGlobalMetric(String eventType, String metricName); @Override String toString(); @Override JSONObject toJSONObject(); boolean getAllowEventCollection(); @Override void setSessionId(String sessionId); @Override void setSessionStartTime(long sessionStartTime); @Override String getSessionId(); @Override long getSessionStartTime();  }### Answer:
@Test public void recordEvent_globalAttributeAndMetricNone_onlyEventSpecific() { final InternalEvent event = MockInternalEvent.newInstance(EVENT_TYPE, TIME_STAMP); event.withAttribute("attr", "attr1").withMetric("metric", 1.0); target.recordEvent(event); ArgumentCaptor<InternalEvent> eventCaptor = ArgumentCaptor.forClass(InternalEvent.class); verify(mockDeliveryClient, times(1)).notify(eventCaptor.capture()); final InternalEvent recievedEvent = eventCaptor.getAllValues().get(0); assertThat(recievedEvent.getEventType(), is(EVENT_TYPE)); assertThat(recievedEvent.getSdkName(), is(SDK_NAME)); assertThat(recievedEvent.getSdkVersion(), is(SDK_VERSION)); assertThat(recievedEvent.getUniqueId().getValue(), is(UNIQUE_ID)); assertTrue(recievedEvent.getEventTimestamp() > 0); assertThat(recievedEvent.getAllAttributes().size(), is(1)); assertThat(recievedEvent.getAllMetrics().size(), is(1)); assertThat(recievedEvent.getMetric("metric"), is(1.0)); }
@Test public void recordEvent_nullEvent_noObserverNotified() { final InternalEvent event = null; target.recordEvent(event); verify(mockDeliveryClient, times(0)).notify(any(DefaultEvent.class)); }