@Test public void checkNotNegativeInteger() { ConfigValueHelper.checkNotNegativeInteger("aaa", 1); ConfigValueHelper.checkNotNegativeInteger("aaa", 0); try { ConfigValueHelper.checkNotNegativeInteger("aaa", -1); Assert.fail(); } catch (Exception e) { Assert.assertTrue(e.getMessage().contains("aaa")); } }
protected static void checkNotNegativeInteger(String configKey, int configValue) throws SofaRpcRuntimeException { if (configValue < 0) { throw ExceptionUtils.buildRuntime(configKey, configValue + "", "must >= 0"); } }
ConfigValueHelper { protected static void checkNotNegativeInteger(String configKey, int configValue) throws SofaRpcRuntimeException { if (configValue < 0) { throw ExceptionUtils.buildRuntime(configKey, configValue + "", "must >= 0"); } } }
ConfigValueHelper { protected static void checkNotNegativeInteger(String configKey, int configValue) throws SofaRpcRuntimeException { if (configValue < 0) { throw ExceptionUtils.buildRuntime(configKey, configValue + "", "must >= 0"); } }  }
ConfigValueHelper { protected static void checkNotNegativeInteger(String configKey, int configValue) throws SofaRpcRuntimeException { if (configValue < 0) { throw ExceptionUtils.buildRuntime(configKey, configValue + "", "must >= 0"); } }   }
ConfigValueHelper { protected static void checkNotNegativeInteger(String configKey, int configValue) throws SofaRpcRuntimeException { if (configValue < 0) { throw ExceptionUtils.buildRuntime(configKey, configValue + "", "must >= 0"); } }    }