UAHttpStatusUtil { public static boolean inServerErrorRange(int statusCode) { return statusCode / 100 == 5; }  static boolean inSuccessRange(int statusCode); static boolean inRedirectionRange(int statusCode); static boolean inClientErrorRange(int statusCode); static boolean inServerErrorRange(int statusCode);  }
@Test public void testInServerErrorRangePass() { assertTrue("UAHttpStatusUtil inServerErrorRange should return true.", UAHttpStatusUtil.inServerErrorRange(HttpURLConnection.HTTP_INTERNAL_ERROR)); }
@Test public void testInServerErrorRangeFail() { assertFalse("UAHttpStatusUtil inServerErrorRange should return false.", UAHttpStatusUtil.inServerErrorRange(HttpURLConnection.HTTP_OK)); }
@Test public void testInServerErrorRangeZero() { assertFalse("UAHttpStatusUtil inServerErrorRange should return false.", UAHttpStatusUtil.inServerErrorRange(0)); }
@Test public void testInServerErrorRangeNegative() { assertFalse("UAHttpStatusUtil inServerErrorRange should return false.", UAHttpStatusUtil.inServerErrorRange(-1)); }