@Test public void testGetTablesCornerCase() throws MetaStoreException { MetaStore adapter = mock(MetaStore.class); TableEvictor tableEvictor = new CountEvictor(adapter, 20); Map<TimeGranularity, AccessCountTableDeque> map = new HashMap<>(); AccessCountTableDeque minute = new AccessCountTableDeque(tableEvictor); map.put(TimeGranularity.MINUTE, minute); AccessCountTableDeque secondDeque = new AccessCountTableDeque(tableEvictor); AccessCountTable firstFiveSeconds = new AccessCountTable(0L, 5 * Constants.ONE_SECOND_IN_MILLIS); AccessCountTable secondFiveSeconds = new AccessCountTable(5 * Constants.ONE_SECOND_IN_MILLIS, 10 * Constants.ONE_SECOND_IN_MILLIS); secondDeque.addAndNotifyListener(firstFiveSeconds); secondDeque.addAndNotifyListener(secondFiveSeconds); map.put(TimeGranularity.SECOND, secondDeque); List<AccessCountTable> result = AccessCountTableManager.getTables(map, adapter, 2 * Constants.ONE_MINUTE_IN_MILLIS); Assert.assertTrue(result.size() == 2); Assert.assertTrue(result.get(0).equals(firstFiveSeconds)); Assert.assertTrue(result.get(1).equals(secondFiveSeconds)); }
public List<AccessCountTable> getTables(long lengthInMillis) throws MetaStoreException { return AccessCountTableManager.getTables(this.tableDeques, this.metaStore, lengthInMillis); }
AccessCountTableManager { public List<AccessCountTable> getTables(long lengthInMillis) throws MetaStoreException { return AccessCountTableManager.getTables(this.tableDeques, this.metaStore, lengthInMillis); } }
AccessCountTableManager { public List<AccessCountTable> getTables(long lengthInMillis) throws MetaStoreException { return AccessCountTableManager.getTables(this.tableDeques, this.metaStore, lengthInMillis); } AccessCountTableManager(MetaStore adapter);  AccessCountTableManager(MetaStore adapter, ExecutorService service); }
AccessCountTableManager { public List<AccessCountTable> getTables(long lengthInMillis) throws MetaStoreException { return AccessCountTableManager.getTables(this.tableDeques, this.metaStore, lengthInMillis); } AccessCountTableManager(MetaStore adapter);  AccessCountTableManager(MetaStore adapter, ExecutorService service); void addTable(AccessCountTable accessCountTable); void onAccessEventsArrived(List<FileAccessEvent> accessEvents); List<AccessCountTable> getTables(long lengthInMillis); static List<AccessCountTable> getTables(
      Map<TimeGranularity, AccessCountTableDeque> tableDeques,
      MetaStore metaStore,
      long lengthInMillis); }
AccessCountTableManager { public List<AccessCountTable> getTables(long lengthInMillis) throws MetaStoreException { return AccessCountTableManager.getTables(this.tableDeques, this.metaStore, lengthInMillis); } AccessCountTableManager(MetaStore adapter);  AccessCountTableManager(MetaStore adapter, ExecutorService service); void addTable(AccessCountTable accessCountTable); void onAccessEventsArrived(List<FileAccessEvent> accessEvents); List<AccessCountTable> getTables(long lengthInMillis); static List<AccessCountTable> getTables(
      Map<TimeGranularity, AccessCountTableDeque> tableDeques,
      MetaStore metaStore,
      long lengthInMillis); static final Logger LOG; }