### Question:
BreakpointStoreOnCache implements DownloadStore { @Override public boolean markFileClear(int id) { synchronized (fileDirtyList) { return fileDirtyList.remove(Integer.valueOf(id)); } } BreakpointStoreOnCache();   BreakpointStoreOnCache(SparseArray<BreakpointInfo> storedInfos,
                           List<Integer> fileDirtyList,
                           HashMap<String, String> responseFilenameMap,
                           SparseArray<IdentifiedTask> unStoredTasks,
                           List<Integer> sortedOccupiedIds,
                           KeyToIdMap keyToIdMap);  BreakpointStoreOnCache(SparseArray<BreakpointInfo> storedInfos,
                                  List<Integer> fileDirtyList,
                                  HashMap<String, String> responseFilenameMap); @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 synchronized void remove(int id); @Override synchronized int findOrCreateId(@NonNull DownloadTask task); @Override BreakpointInfo findAnotherInfoFromCompare(@NonNull DownloadTask task,
                                                     @NonNull BreakpointInfo ignored); @Override boolean isOnlyMemoryCache(); @Override boolean isFileDirty(int id); @Nullable @Override String getResponseFilename(String url); static final int FIRST_ID; }### Answer:
@Test public void markFileClear() { List<Integer> fileDirtyList = new ArrayList<>(); fileDirtyList.add(1); final BreakpointStoreOnCache cache = spy(new BreakpointStoreOnCache( new SparseArray<BreakpointInfo>(), fileDirtyList, new HashMap<String, String>(), new SparseArray<IdentifiedTask>(), new ArrayList<Integer>(), keyToIdMap)); assertThat(cache.markFileClear(1)).isTrue(); assertThat(fileDirtyList).isEmpty(); assertThat(cache.markFileClear(2)).isFalse(); }