### Question:
SiteConfiguration extends AccumuloConfiguration { @Override public String get(Property property) { String value = config.get(property.getKey()); if (value == null || !property.getType().isValidFormat(value)) { if (value != null) { log.error("Using default value for {} due to improperly formatted {}: {}", property.getKey(), property.getType(), value); } value = parent.get(property); } return value; } private  SiteConfiguration(Map<String,String> config); static SiteConfiguration.OverridesOption fromEnv(); static SiteConfiguration.OverridesOption fromFile(File propertiesFileLocation); static SiteConfiguration auto(); @Override String get(Property property); @Override boolean isPropertySet(Property prop, boolean cacheAndWatch); @Override void getProperties(Map<String,String> props, Predicate<String> filter); void getProperties(Map<String,String> props, Predicate<String> filter,
      boolean useDefaults);  }### Answer:
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN", justification = "path to keystore not provided by user input") @Test public void testOnlySensitivePropertiesExtractedFromCredentialProvider() throws SecurityException { URL keystore = SiteConfigurationTest.class.getResource("/site-cfg.jceks"); assertNotNull(keystore); String credProvPath = "jceks: var overrides = Map.of(Property.GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS.getKey(), credProvPath); var config = new SiteConfiguration.Builder().noFile().withOverrides(overrides).build(); assertEquals("mysecret", config.get(Property.INSTANCE_SECRET)); assertNull(config.get("ignored.property")); assertEquals(Property.GENERAL_RPC_TIMEOUT.getDefaultValue(), config.get(Property.GENERAL_RPC_TIMEOUT.getKey())); }
@Test public void testFile() { URL propsUrl = getClass().getClassLoader().getResource("accumulo2.properties"); var conf = new SiteConfiguration.Builder().fromUrl(propsUrl).build(); assertEquals("myhost123:2181", conf.get(Property.INSTANCE_ZK_HOST)); assertEquals("mysecret", conf.get(Property.INSTANCE_SECRET)); assertEquals("hdfs: assertEquals("123s", conf.get(Property.GENERAL_RPC_TIMEOUT)); assertEquals("256M", conf.get(Property.TSERV_WALOG_MAX_SIZE)); assertEquals("org.apache.accumulo.core.cryptoImpl.AESCryptoService", conf.get(Property.INSTANCE_CRYPTO_SERVICE)); }