### Question:
BreakpointStoreOnCache implements DownloadStore { @Override public synchronized void remove(int id) { storedInfos.remove(id); if (unStoredTasks.get(id) == null) sortedOccupiedIds.remove(Integer.valueOf(id)); keyToIdMap.remove(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 remove() { final BreakpointStoreOnCache cache = spy(new BreakpointStoreOnCache( storedInfos, new ArrayList<Integer>(), new HashMap<String, String>(), unStoredTasks, sortedOccupiedIds, keyToIdMap)); storedInfos.put(1, info); sortedOccupiedIds.add(1); cache.remove(1); assertThat(storedInfos.size()).isZero(); assertThat(sortedOccupiedIds).isEmpty(); verify(keyToIdMap).remove(eq(1)); }