CustomTimeBucket implements Serializable, Comparable<CustomTimeBucket> { public long toMillis(long multCount) { return numMillis * multCount; } private  CustomTimeBucket();  CustomTimeBucket(String timeBucketText);  CustomTimeBucket(TimeBucket timeBucket, long count);  CustomTimeBucket(TimeBucket timeBucket); boolean isUnit(); TimeBucket getTimeBucket(); long getCount(); long getNumMillis(); long toMillis(long multCount); long roundDown(long timestamp); String getText(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(CustomTimeBucket other); static final String TIME_BUCKET_NAME_REGEX; static final Pattern TIME_BUCKET_NAME_PATTERN; }
@Test public void testToMillis() { CustomTimeBucket customTimeBucket = new CustomTimeBucket("5m"); Assert.assertEquals(5L * 60L * 1000L, customTimeBucket.getNumMillis()); }