Bucket { boolean hasIdentifier(Identifier id) { return values.containsKey(id); } 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 testHasIdentifier() { for (int i = 0; i < 4; ++i) { bucket.put(new Sample(new Measurement(i), new Identifier("nalle_" + i, new Point( new ImmutableMap.Builder<String, Integer>().put(String.valueOf(i), Integer.valueOf(i)).build())), AssumedType.GAUGE)); } for (int i = 0; i < 4; ++i) { assertTrue(bucket.hasIdentifier(new Identifier("nalle_" + i, new Point(new ImmutableMap.Builder<String, Integer>().put( String.valueOf(i), Integer.valueOf(i)).build())))); } }