### Question:
BreakpointStoreOnSQLite implements DownloadStore { @Override public boolean markFileDirty(int id) { if (onCache.markFileDirty(id)) { helper.markFileDirty(id); return true; } return false; } 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 markFileDirty() { doReturn(false).when(onCache).markFileDirty(1); assertThat(store.markFileDirty(1)).isFalse(); verify(helper, never()).markFileDirty(eq(1)); doReturn(true).when(onCache).markFileDirty(1); assertThat(store.markFileDirty(1)).isTrue(); verify(helper).markFileDirty(eq(1)); }