### Question:
DownloadStrategy { public void inspectFilenameFromResume(@NonNull String filenameOnStore, @NonNull DownloadTask task) { final String filename = task.getFilename(); if (Util.isEmpty(filename)) { task.getFilenameHolder().set(filenameOnStore); } }  ResumeAvailableResponseCheck resumeAvailableResponseCheck(
            DownloadConnection.Connected connected,
            int blockIndex,
            BreakpointInfo info); int determineBlockCount(@NonNull DownloadTask task, long totalLength); long reuseIdledSameInfoThresholdBytes(); boolean inspectAnotherSameInfo(@NonNull DownloadTask task, @NonNull BreakpointInfo info,
                                          long instanceLength); boolean isUseMultiBlock(final boolean isAcceptRange); void inspectFilenameFromResume(@NonNull String filenameOnStore,
                                          @NonNull DownloadTask task); void validFilenameFromResponse(@Nullable String responseFileName,
                                          @NonNull DownloadTask task,
                                          @NonNull BreakpointInfo info); boolean validFilenameFromStore(@NonNull DownloadTask task); void validInfoOnCompleted(@NonNull DownloadTask task, @NonNull DownloadStore store); @Nullable ResumeFailedCause getPreconditionFailedCause(int responseCode,
                                                                  boolean isAlreadyProceed,
                                                                  @NonNull BreakpointInfo info,
                                                                  @Nullable String responseEtag); boolean isServerCanceled(int responseCode, boolean isAlreadyProceed); void inspectNetworkAvailable(); void inspectNetworkOnWifi(@NonNull DownloadTask task);  }### Answer:
@Test public void validFilenameResume() { final String taskFilename = "task-filename"; when(task.getFilename()).thenReturn(taskFilename); final DownloadStrategy.FilenameHolder filenameHolder = mock( DownloadStrategy.FilenameHolder.class); when(task.getFilenameHolder()).thenReturn(filenameHolder); final String storeFilename = "store-filename"; strategy.inspectFilenameFromResume(storeFilename, task); verify(filenameHolder, never()).set(anyString()); when(task.getFilename()).thenReturn(null); strategy.inspectFilenameFromResume(storeFilename, task); verify(filenameHolder).set(storeFilename); }