@Test public void happyCase() { MetricClassification classification = new MetricClassification(this.keys, metricClassificationTestCases.completeTestCase(5d)); SupportedJMXBean[] supportedJMXBeans = SupportedJMXBean.values(); for (SupportedJMXBean bean : supportedJMXBeans) { int actualMetricQty = classification.getMetrics(bean.getMetricName()).size(); String assertionMessage = "Expected 10 metrics for bean " + bean.name() + ", but found " + actualMetricQty; Assert.assertEquals(assertionMessage, 10, actualMetricQty); } }
public List<Metric> getMetrics(String key) { List<Metric> metrics = this.classification.get(key); return metrics != null ? metrics : Lists.<Metric>newLinkedList(); }
MetricClassification { public List<Metric> getMetrics(String key) { List<Metric> metrics = this.classification.get(key); return metrics != null ? metrics : Lists.<Metric>newLinkedList(); } }
MetricClassification { public List<Metric> getMetrics(String key) { List<Metric> metrics = this.classification.get(key); return metrics != null ? metrics : Lists.<Metric>newLinkedList(); } MetricClassification(List<String> keys, List<Metric> sample); }
MetricClassification { public List<Metric> getMetrics(String key) { List<Metric> metrics = this.classification.get(key); return metrics != null ? metrics : Lists.<Metric>newLinkedList(); } MetricClassification(List<String> keys, List<Metric> sample); Map<String, List<Metric>> getClassification(); List<Metric> getMetrics(String key); Set<String> getKeys(); }
MetricClassification { public List<Metric> getMetrics(String key) { List<Metric> metrics = this.classification.get(key); return metrics != null ? metrics : Lists.<Metric>newLinkedList(); } MetricClassification(List<String> keys, List<Metric> sample); Map<String, List<Metric>> getClassification(); List<Metric> getMetrics(String key); Set<String> getKeys();  }