OAuthAuthorityUtils { public static final String getProperty(String key, String def) { return System.getProperty(OAuthAuthorityConsts.SYSTEM_PROP_PREFIX + key, def); } private  OAuthAuthorityUtils(); static final String getProperty(String key, String def); static final Set<String> csvToSet(String csv, String delimiter); static final String extractHeaderToken(HttpServletRequest request);  }
@Test public void testGetProperty() { String propValue = null; System.clearProperty("athenz.auth.oauth.jwt.test_prop"); propValue = OAuthAuthorityUtils.getProperty("test_prop", null); assertEquals(propValue, null); propValue = OAuthAuthorityUtils.getProperty("test_prop", ""); assertEquals(propValue, ""); propValue = OAuthAuthorityUtils.getProperty("test_prop", "default_value"); assertEquals(propValue, "default_value"); System.setProperty("athenz.auth.oauth.jwt.test_prop", "test_value"); propValue = OAuthAuthorityUtils.getProperty("test_prop", null); assertEquals(propValue, "test_value"); propValue = OAuthAuthorityUtils.getProperty("test_prop", ""); assertEquals(propValue, "test_value"); propValue = OAuthAuthorityUtils.getProperty("test_prop", "default_value"); assertEquals(propValue, "test_value"); System.clearProperty("athenz.auth.oauth.jwt.test_prop"); }