### Question:
Util { public static long parseContentLength(@Nullable String contentLength) { if (contentLength == null) return CHUNKED_CONTENT_LENGTH; try { return Long.parseLong(contentLength); } catch (NumberFormatException ignored) { Util.d("Util", "parseContentLength failed parse for '" + contentLength + "'"); } return CHUNKED_CONTENT_LENGTH; }  static void enableConsoleLog(); static void setLogger(@Nullable Logger l); static Logger getLogger(); static void e(String tag, String msg, Exception e); static void w(String tag, String msg); static void d(String tag, String msg); static void i(String tag, String msg); static boolean isEmpty(@Nullable CharSequence str); static ThreadFactory threadFactory(final String name, final boolean daemon); @Nullable static String md5(String string); static boolean isCorrectFull(long fetchedLength, long contentLength); static void resetBlockIfDirty(BlockInfo info); static long getFreeSpaceBytes(@NonNull StatFs statFs); static String humanReadableBytes(long bytes, boolean si); static @NonNull DownloadStore createDefaultDatabase(Context context); static @NonNull DownloadStore createRemitDatabase(@NonNull DownloadStore originStore); static @NonNull DownloadConnection.Factory createDefaultConnectionFactory(); static void assembleBlock(@NonNull DownloadTask task, @NonNull BreakpointInfo info,
                                     long instanceLength,
                                     boolean isAcceptRange); static long parseContentLength(@Nullable String contentLength); static boolean isNetworkNotOnWifiType(ConnectivityManager manager); static boolean checkPermission(String permission); static long parseContentLengthFromContentRange(@Nullable String contentRange); static boolean isUriContentScheme(@NonNull Uri uri); static boolean isUriFileScheme(@NonNull Uri uri); @Nullable static String getFilenameFromContentUri(@NonNull Uri contentUri); @SuppressFBWarnings(value = "DMI") @NonNull static File getParentFile(final File file); static long getSizeFromContentUri(@NonNull Uri contentUri); static boolean isNetworkAvailable(ConnectivityManager manager); static void inspectUserHeader(@NonNull Map<String, List<String>> headerField); static void addUserRequestHeaderField(@NonNull Map<String, List<String>> userHeaderField,
                                                 @NonNull DownloadConnection connection); static void addRequestHeaderFields(
            @NonNull Map<String, List<String>> headerFields,
            @NonNull DownloadConnection connection); static void addDefaultUserAgent(@NonNull final DownloadConnection connection); static final String METHOD_HEAD; static final String RANGE; static final String IF_MATCH; static final String USER_AGENT; static final String CONTENT_LENGTH; static final String CONTENT_RANGE; static final String ETAG; static final String TRANSFER_ENCODING; static final String ACCEPT_RANGES; static final String CONTENT_DISPOSITION; static final String VALUE_CHUNKED; static final int CHUNKED_CONTENT_LENGTH; static final int RANGE_NOT_SATISFIABLE; }### Answer:
@Test public void parseContentLength() { assertThat(Util.parseContentLength(null)).isEqualTo(CHUNKED_CONTENT_LENGTH); assertThat(Util.parseContentLength("123")).isEqualTo(123L); assertThat(Util.parseContentLength("-")).isEqualTo(CHUNKED_CONTENT_LENGTH); }