@Test public void testConfigValidation() throws Exception { EnvironmentBasedSecretsProvider provider = new EnvironmentBasedSecretsProvider(); assertNull(provider.provideSecret("mySecretName", "Ignored")); injectEnvironmentVariable("mySecretName", "SecretValue"); assertEquals(provider.provideSecret("mySecretName", "Ignored"), "SecretValue"); }
@Override public String provideSecret(String secretName, Object pathToSecret) { return System.getenv(secretName); }
EnvironmentBasedSecretsProvider implements SecretsProvider { @Override public String provideSecret(String secretName, Object pathToSecret) { return System.getenv(secretName); } }
EnvironmentBasedSecretsProvider implements SecretsProvider { @Override public String provideSecret(String secretName, Object pathToSecret) { return System.getenv(secretName); }  }
EnvironmentBasedSecretsProvider implements SecretsProvider { @Override public String provideSecret(String secretName, Object pathToSecret) { return System.getenv(secretName); }  @Override String provideSecret(String secretName, Object pathToSecret); }
EnvironmentBasedSecretsProvider implements SecretsProvider { @Override public String provideSecret(String secretName, Object pathToSecret) { return System.getenv(secretName); }  @Override String provideSecret(String secretName, Object pathToSecret);  }