Bucket { public Collection<String> getAllMetricNames() { Set<String> names = new HashSet<>(); for (Identifier id : values.keySet()) { names.add(id.getName()); } return names; } Bucket();  Bucket(long fromMillis, long toMillis); Set<Map.Entry<Identifier, UntypedMetric>> entrySet(); Collection<String> getAllMetricNames(); Collection<Map.Entry<Point, UntypedMetric>> getValuesForMetric(String metricName); Map<Point, UntypedMetric> getMapForMetric(String metricName); Map<String, List<Map.Entry<Point, UntypedMetric>>> getValuesByMetricName(); @Override String toString(); long getFromMillis(); long getToMillis();  }
@Test public final void testGetAllMetricNames() { twoMetricsUniqueDimensions(); Collection<String> names = bucket.getAllMetricNames(); assertEquals(2, names.size()); assertTrue(names.contains("nalle")); assertTrue(names.contains("nalle2")); }