### Question:
BreakpointStoreOnSQLite implements DownloadStore { @Override public boolean isFileDirty(int id) { return onCache.isFileDirty(id); } BreakpointStoreOnSQLite(BreakpointSQLiteHelper helper, BreakpointStoreOnCache onCache);  BreakpointStoreOnSQLite(Context context); @Nullable @Override BreakpointInfo get(int id); @NonNull @Override BreakpointInfo createAndInsert(@NonNull DownloadTask task); @Override void onTaskStart(int id); @Override void onSyncToFilesystemSuccess(@NonNull BreakpointInfo info, int blockIndex,
                                                    long increaseLength); @Override boolean update(@NonNull BreakpointInfo breakpointInfo); @Override void onTaskEnd(int id, @NonNull EndCause cause, @Nullable Exception exception); @Nullable @Override BreakpointInfo getAfterCompleted(int id); @Override boolean markFileDirty(int id); @Override boolean markFileClear(int id); @Override void remove(int id); @Override int findOrCreateId(@NonNull DownloadTask task); @Nullable @Override BreakpointInfo findAnotherInfoFromCompare(@NonNull DownloadTask task,
                                                     @NonNull BreakpointInfo ignored); @Override boolean isOnlyMemoryCache(); @Override boolean isFileDirty(int id); @Nullable @Override String getResponseFilename(String url); @NonNull DownloadStore createRemitSelf();  }### Answer:
@Test public void isFileDirty() { doReturn(true).when(onCache).isFileDirty(1); assertThat(store.isFileDirty(1)).isTrue(); doReturn(false).when(onCache).isFileDirty(1); assertThat(store.isFileDirty(1)).isFalse(); }