UAHttpStatusUtil { public static boolean inSuccessRange(int statusCode) { return statusCode / 100 == 2; }  static boolean inSuccessRange(int statusCode); static boolean inRedirectionRange(int statusCode); static boolean inClientErrorRange(int statusCode); static boolean inServerErrorRange(int statusCode);  }
@Test public void testInSuccessRangePass() { assertTrue("UAHttpStatusUtil inSuccessRange should return true.", UAHttpStatusUtil.inSuccessRange(HttpURLConnection.HTTP_OK)); }
@Test public void testInSuccessRangeFail() { assertFalse("UAHttpStatusUtil inSuccessRange should return false.", UAHttpStatusUtil.inSuccessRange(HttpURLConnection.HTTP_NOT_FOUND)); }
@Test public void testInSuccessRangeZero() { assertFalse("UAHttpStatusUtil inSuccessRange should return false.", UAHttpStatusUtil.inSuccessRange(0)); }
@Test public void testInSuccessRangeNegative() { assertFalse("UAHttpStatusUtil inSuccessRange should return false.", UAHttpStatusUtil.inSuccessRange(-1)); }