UAHttpStatusUtil { public static boolean inRedirectionRange(int statusCode) { return statusCode / 100 == 3; }  static boolean inSuccessRange(int statusCode); static boolean inRedirectionRange(int statusCode); static boolean inClientErrorRange(int statusCode); static boolean inServerErrorRange(int statusCode);  }
@Test public void testInRedirectionRangePass() { assertTrue("UAHttpStatusUtil inRedirectionRange should return true.", UAHttpStatusUtil.inRedirectionRange(HttpURLConnection.HTTP_MOVED_PERM)); }
@Test public void testInRedirectionRangeFail() { assertFalse("UAHttpStatusUtil inRedirectionRange should return false.", UAHttpStatusUtil.inRedirectionRange(HttpURLConnection.HTTP_NOT_FOUND)); }
@Test public void testInRedirectionRangeZero() { assertFalse("UAHttpStatusUtil inRedirectionRange should return false.", UAHttpStatusUtil.inRedirectionRange(0)); }
@Test public void testInRedirectionRangeNegative() { assertFalse("UAHttpStatusUtil inRedirectionRange should return false.", UAHttpStatusUtil.inRedirectionRange(-1)); }