### Question:
DownloadTask extends IdentifiedTask implements Comparable<DownloadTask> { @Nullable public BreakpointInfo getInfo() { if (info == null) info = OkDownload.with().breakpointStore().get(id); return info; } DownloadTask(String url, Uri uri, int priority, int readBufferSize, int flushBufferSize,
                        int syncBufferSize, int syncBufferIntervalMills,
                        boolean autoCallbackToUIThread, int minIntervalMillisCallbackProcess,
                        Map<String, List<String>> headerMapFields, @Nullable String filename,
                        boolean passIfAlreadyCompleted, boolean wifiRequired,
                        Boolean filenameFromResponse, @Nullable Integer connectionCount,
                        @Nullable Boolean isPreAllocateLength); boolean isFilenameFromResponse(); @Nullable Map<String, List<String>> getHeaderMapFields(); @Override int getId(); @Nullable String getFilename(); boolean isPassIfAlreadyCompleted(); boolean isWifiRequired(); DownloadStrategy.FilenameHolder getFilenameHolder(); Uri getUri(); @NonNull String getUrl(); void setRedirectLocation(@Nullable String redirectUrl); @Nullable String getRedirectLocation(); @Override @NonNull File getParentFile(); @Nullable File getFile(); int getReadBufferSize(); int getFlushBufferSize(); int getSyncBufferSize(); int getSyncBufferIntervalMills(); boolean isAutoCallbackToUIThread(); int getMinIntervalMillisCallbackProcess(); @Nullable Integer getSetConnectionCount(); @Nullable Boolean getSetPreAllocateLength(); int getConnectionCount(); Object getTag(int key); Object getTag(); @Nullable BreakpointInfo getInfo(); synchronized DownloadTask addTag(int key, Object value); synchronized void removeTag(int key); synchronized void removeTag(); void setTag(Object tag); void replaceListener(@NonNull DownloadListener listener); static void enqueue(DownloadTask[] tasks, DownloadListener listener); void enqueue(DownloadListener listener); void execute(DownloadListener listener); void cancel(); static void cancel(DownloadTask[] tasks); DownloadListener getListener(); int getPriority(); Builder toBuilder(String anotherUrl, Uri anotherUri); Builder toBuilder(); void setTags(DownloadTask oldTask); @Override int compareTo(@NonNull DownloadTask o); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static MockTaskForCompare mockTaskForCompare(int id); @NonNull MockTaskForCompare mock(int id);  }### Answer:
@Test public void getInfo() throws IOException { mockOkDownload(); final BreakpointInfo info = mock(BreakpointInfo.class); final BreakpointStore store = OkDownload.with().breakpointStore(); when(store.get(1)).thenReturn(info); when(store.findOrCreateId(any(DownloadTask.class))).thenReturn(1); final DownloadTask task = new DownloadTask .Builder("https: .build(); assertThat(task.getInfo()).isEqualTo(info); }