@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) { } }
public void injectMetrics(RestRequestMetrics restRequestMetrics) { if (restRequestMetrics != null) { metrics = restRequestMetrics; } else { throw new IllegalArgumentException("RestRequestMetrics provided cannot be null"); } }
RestRequestMetricsTracker { public void injectMetrics(RestRequestMetrics restRequestMetrics) { if (restRequestMetrics != null) { metrics = restRequestMetrics; } else { throw new IllegalArgumentException("RestRequestMetrics provided cannot be null"); } } }
RestRequestMetricsTracker { public void injectMetrics(RestRequestMetrics restRequestMetrics) { if (restRequestMetrics != null) { metrics = restRequestMetrics; } else { throw new IllegalArgumentException("RestRequestMetrics provided cannot be null"); } }  }
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); }
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; }