UAHttpStatusUtil { public static boolean inClientErrorRange(int statusCode) { return statusCode / 100 == 4; }  static boolean inSuccessRange(int statusCode); static boolean inRedirectionRange(int statusCode); static boolean inClientErrorRange(int statusCode); static boolean inServerErrorRange(int statusCode);  }
@Test public void testInClientErrorRangePass() { assertTrue("UAHttpStatusUtil inClientErrorRange should return true.", UAHttpStatusUtil.inClientErrorRange(HttpURLConnection.HTTP_BAD_REQUEST)); }
@Test public void testInClientErrorRangeFail() { assertFalse("UAHttpStatusUtil inClientErrorRange should return false.", UAHttpStatusUtil.inClientErrorRange(HttpURLConnection.HTTP_OK)); }
@Test public void testInClientErrorRangeZero() { assertFalse("UAHttpStatusUtil inClientErrorRange should return false.", UAHttpStatusUtil.inClientErrorRange(0)); }
@Test public void testInClientErrorRangeNegative() { assertFalse("UAHttpStatusUtil inClientErrorRange should return false.", UAHttpStatusUtil.inClientErrorRange(-1)); }