### Question:
DownloadStrategy { public int determineBlockCount(@NonNull DownloadTask task, long totalLength) { if (task.getSetConnectionCount() != null) return task.getSetConnectionCount(); if (totalLength < ONE_CONNECTION_UPPER_LIMIT) { return 1; } if (totalLength < TWO_CONNECTION_UPPER_LIMIT) { return 2; } if (totalLength < THREE_CONNECTION_UPPER_LIMIT) { return 3; } if (totalLength < FOUR_CONNECTION_UPPER_LIMIT) { return 4; } return 5; }  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 determineBlockCount() { when(task.getSetConnectionCount()).thenReturn(null); assertThat(strategy.determineBlockCount(task, 500)).isEqualTo(1); assertThat(strategy.determineBlockCount(task, 900 * 1024)) .isEqualTo(1); assertThat(strategy.determineBlockCount(task, 2 * 1024 * 1024)) .isEqualTo(2); assertThat(strategy.determineBlockCount(task, (long) (4.9 * 1024 * 1024))).isEqualTo(2); assertThat(strategy.determineBlockCount(task, 18 * 1024 * 1024)) .isEqualTo(3); assertThat(strategy.determineBlockCount(task, 49 * 1024 * 1024)) .isEqualTo(3); assertThat(strategy.determineBlockCount(task, 66 * 1024 * 1024)) .isEqualTo(4); assertThat(strategy.determineBlockCount(task, 99 * 1024 * 1024)) .isEqualTo(4); assertThat(strategy.determineBlockCount(task, 1000 * 1024 * 1024)) .isEqualTo(5); assertThat(strategy.determineBlockCount(task, 5323L * 1024 * 1024)) .isEqualTo(5); when(task.getSetConnectionCount()).thenReturn(100); assertThat(strategy.determineBlockCount(task, 500)).isEqualTo(100); }