LongTimeSeries implements TimeSeries<Long> { public TimeBucket getTimeBucket() { return timeBucket; } LongTimeSeries(final TimeBucket timeBucket); @JsonCreator  LongTimeSeries(@JsonProperty("timeBucket") final TimeBucket timeBucket,
                          @JsonProperty("timeSeries") final Map<Instant, Long> timeSeries); @Override void put(final Instant instant, final Long value); @JsonIgnore @Override Long get(final Instant instant); void upsert(final Instant instant, final long count); @JsonIgnore SortedSet<Instant> getInstants(); @JsonIgnore int getNumberOfInstants(); SortedMap<Instant, Long> getTimeSeries(); void setTimeSeries(final Map<Instant, Long> timeSeries); TimeBucket getTimeBucket(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testGetTimeBucket() { final LongTimeSeries timeSeries1 = new LongTimeSeries(TimeBucket.MINUTE); final LongTimeSeries timeSeries2 = new LongTimeSeries(TimeBucket.HOUR); final TimeBucket bucket1 = timeSeries1.getTimeBucket(); final TimeBucket bucket2 = timeSeries2.getTimeBucket(); assertEquals(TimeBucket.MINUTE, bucket1); assertEquals(TimeBucket.HOUR, bucket2); }