### Question:
RedirectUtil { public static boolean isRedirect(int code) { return code == HttpURLConnection.HTTP_MOVED_PERM || code == HttpURLConnection.HTTP_MOVED_TEMP || code == HttpURLConnection.HTTP_SEE_OTHER || code == HttpURLConnection.HTTP_MULT_CHOICE || code == HTTP_TEMPORARY_REDIRECT || code == HTTP_PERMANENT_REDIRECT; }  static boolean isRedirect(int code); @NonNull static String getRedirectedUrl(DownloadConnection.Connected connected, int responseCode); static final int MAX_REDIRECT_TIMES; }### Answer:
@Test public void isRedirect() { assertTrue(RedirectUtil.isRedirect(HttpURLConnection.HTTP_MOVED_PERM)); assertTrue(RedirectUtil.isRedirect(HttpURLConnection.HTTP_MOVED_TEMP)); assertTrue(RedirectUtil.isRedirect(HttpURLConnection.HTTP_SEE_OTHER)); assertTrue(RedirectUtil.isRedirect(HttpURLConnection.HTTP_MULT_CHOICE)); assertTrue(RedirectUtil.isRedirect(RedirectUtil.HTTP_TEMPORARY_REDIRECT)); assertTrue(RedirectUtil.isRedirect(RedirectUtil.HTTP_PERMANENT_REDIRECT)); assertFalse(RedirectUtil.isRedirect(HttpsURLConnection.HTTP_ACCEPTED)); }