@Test public void getDownloads_emptyDownloadIndex_returnsEmptyArray() throws DatabaseIOException { assertThat(downloadIndex.getDownloads().getCount()).isEqualTo(0); }
@Override public DownloadCursor getDownloads(@Download.State int... states) throws DatabaseIOException { ensureInitialized(); Cursor cursor = getCursor(getStateQuery(states), null); return new DownloadCursorImpl(cursor); }
DefaultDownloadIndex implements WritableDownloadIndex { @Override public DownloadCursor getDownloads(@Download.State int... states) throws DatabaseIOException { ensureInitialized(); Cursor cursor = getCursor(getStateQuery(states), null); return new DownloadCursorImpl(cursor); } }
DefaultDownloadIndex implements WritableDownloadIndex { @Override public DownloadCursor getDownloads(@Download.State int... states) throws DatabaseIOException { ensureInitialized(); Cursor cursor = getCursor(getStateQuery(states), null); return new DownloadCursorImpl(cursor); } DefaultDownloadIndex(DatabaseProvider databaseProvider);  DefaultDownloadIndex(DatabaseProvider databaseProvider, String name); }
DefaultDownloadIndex implements WritableDownloadIndex { @Override public DownloadCursor getDownloads(@Download.State int... states) throws DatabaseIOException { ensureInitialized(); Cursor cursor = getCursor(getStateQuery(states), null); return new DownloadCursorImpl(cursor); } DefaultDownloadIndex(DatabaseProvider databaseProvider);  DefaultDownloadIndex(DatabaseProvider databaseProvider, String name); @Override @Nullable Download getDownload(String id); @Override DownloadCursor getDownloads(@Download.State int... states); @Override void putDownload(Download download); @Override void removeDownload(String id); @Override void setDownloadingStatesToQueued(); @Override void setStopReason(int stopReason); @Override void setStopReason(String id, int stopReason); }
DefaultDownloadIndex implements WritableDownloadIndex { @Override public DownloadCursor getDownloads(@Download.State int... states) throws DatabaseIOException { ensureInitialized(); Cursor cursor = getCursor(getStateQuery(states), null); return new DownloadCursorImpl(cursor); } DefaultDownloadIndex(DatabaseProvider databaseProvider);  DefaultDownloadIndex(DatabaseProvider databaseProvider, String name); @Override @Nullable Download getDownload(String id); @Override DownloadCursor getDownloads(@Download.State int... states); @Override void putDownload(Download download); @Override void removeDownload(String id); @Override void setDownloadingStatesToQueued(); @Override void setStopReason(int stopReason); @Override void setStopReason(String id, int stopReason);  }