### Question:
KeyToIdMap { @Nullable public Integer get(@NonNull DownloadTask task) { final Integer candidate = keyToIdMap.get(generateKey(task)); if (candidate != null) return candidate; return null; } KeyToIdMap();   KeyToIdMap(@NonNull HashMap<String, Integer> keyToIdMap,
               @NonNull SparseArray<String> idToKeyMap); @Nullable Integer get(@NonNull DownloadTask task); void remove(int id); void add(@NonNull DownloadTask task, int id);  }### Answer:
@Test public void get() { assertThat(map.get(task)).isNull(); keyToIdMap.put(map.generateKey(task), 1); assertThat(map.get(task)).isEqualTo(1); }