### Question:
RestRequestMetricsTracker { public void injectMetrics(RestRequestMetrics restRequestMetrics) { if (restRequestMetrics != null) { metrics = restRequestMetrics; } else { throw new IllegalArgumentException("RestRequestMetrics provided cannot be null"); } }  void markFailure(); void markUnsatisfied(); boolean isSatisfied(); void setResponseStatus(ResponseStatus responseStatus); void injectMetrics(RestRequestMetrics restRequestMetrics); void injectContainerMetrics(ContainerMetrics containerMetrics); void recordMetrics(); long getRoundTripTimeInMs(); long getTimeToFirstByteInMs(); static void setDefaults(MetricRegistry metricRegistry); final NioMetricsTracker nioMetricsTracker; final ScalingMetricsTracker scalingMetricsTracker; }### Answer:
@Test public void injectMetricsBadInputTest() { RestRequestMetricsTracker requestMetrics = new RestRequestMetricsTracker(); try { requestMetrics.injectMetrics(null); fail("There was no exception even though a null RestRequestMetrics was provided as input for injectMetrics()"); } catch (IllegalArgumentException e) { } }