import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
public class DatabusSizeCachingTest {
@Test
@SuppressWarnings("unchecked")
<BUG>public void testSizeCache() {
final AtomicLong timeNanos = new AtomicLong(TimeUnit.MILLISECONDS.toNanos(System.currentTimeMillis()));
final Ticker ticker = new Ticker() {
@Override
public long read() {
return timeNanos.get();
}
};</BUG>
DatabusEventStore mockEventStore = mock(DatabusEventStore.class);

import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals;
public class DatabusSizeCachingTest {
@Test
@SuppressWarnings("unchecked")
public void testSizeCache() {
final Clock clock = mock(Clock.class);
long start = System.currentTimeMillis();
when(clock.millis()).thenReturn(start);
DatabusEventStore mockEventStore = mock(DatabusEventStore.class);
