### Question:
Buckets { public final long getSecondsPerBucket() { return secondsPerBucket; } Buckets();  Buckets(final long secondsPerBucket); Map<Long, Bucket> getBucketList(); void addQueryStatus(P key, QueryStatus status); QueryStatus getQueryStatus(P key); final void add(final P primaryKey, final long timestamp, final double value); final void addInterpolated(final P primaryKey, final long timestamp, final double value); final Buckets<P>.Bucket getBucket(long timestamp); final SortedSet<Long> getTimestamps(); final long getSecondsPerBucket(); final void dump(PrintStream ps); static final long DEFAULT_BUCKET_SIZE; }### Answer:
@Test public void testGetSecondsPerBucket() throws Exception { Buckets<IHasShortcut> testSubject = makeTestBuckets(); assertTrue("Buckets should default to 300 seconds per bucket.", 300 == testSubject.getSecondsPerBucket()); Buckets<IHasShortcut> testSubject2 = new Buckets<>(123); assertTrue("Buckets created with specified seconds per bucket should have that value.", 123 == testSubject2.getSecondsPerBucket()); }
@Test public void specifyingNegativeBucketSizeDefaultsValue() { Buckets<IHasShortcut> testSubject = new Buckets<>(-25l); assertEquals("If a negative bucket is specified, buckets should have default bucket size.", Buckets.DEFAULT_BUCKET_SIZE, testSubject.getSecondsPerBucket()); }