+ * Code samples for the Key Vault in README.md
+ */
+@SpringBootApplication
+public class KeyVaultSample implements CommandLineRunner {
+
+ @Value("${your-property-name}")
+ private String mySecretProperty;
+
+ public static void main(String[] args) {
+ SpringApplication.run(KeyVaultSample.class, args);
+ }
+
+ @Override
+ public void run(String... args) {
+ System.out.println("property your-property-name value is: " + mySecretProperty);
+ }
+}
diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/keyvault/spring/InitializerTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/keyvault/spring/InitializerTest.java
new file mode 100644
index 000000000000..02c0e6682121
--- /dev/null
+++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/keyvault/spring/InitializerTest.java
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.microsoft.azure.keyvault.spring;
+
+import com.microsoft.azure.utils.Constants;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+import org.springframework.core.env.ConfigurableEnvironment;
+import org.springframework.core.env.MutablePropertySources;
+import org.springframework.test.context.TestPropertySource;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import static org.junit.Assert.assertFalse;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@TestPropertySource(locations = "classpath:application.properties")
+public class InitializerTest {
+
+ @Autowired
+ ApplicationContext context;
+
+ @Test
+ public void testAzureKvPropertySourceNotInitialized() {
+ final MutablePropertySources sources =
+ ((ConfigurableEnvironment) context.getEnvironment()).getPropertySources();
+
+ assertFalse("PropertySources should not contains azurekv when enabled=false",
+ sources.contains(Constants.AZURE_KEYVAULT_PROPERTYSOURCE_NAME));
+ }
+}
diff --git a/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/keyvault/spring/KeyVaultEnvironmentPostProcessorTest.java b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/keyvault/spring/KeyVaultEnvironmentPostProcessorTest.java
new file mode 100644
index 000000000000..bca8b8dc7620
--- /dev/null
+++ b/sdk/spring/azure-spring-boot/src/test/java/com/microsoft/azure/keyvault/spring/KeyVaultEnvironmentPostProcessorTest.java
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.microsoft.azure.keyvault.spring;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.identity.ClientCertificateCredential;
+import com.azure.identity.ClientSecretCredential;
+import com.azure.identity.ManagedIdentityCredential;
+import com.microsoft.azure.utils.Constants;
+import org.hamcrest.core.IsInstanceOf;
+import org.junit.Before;
+import org.junit.Test;
+import org.springframework.boot.autoconfigure.AutoConfigurations;
+import org.springframework.boot.test.context.runner.ApplicationContextRunner;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.core.env.MapPropertySource;
+import org.springframework.core.env.MutablePropertySources;
+import org.springframework.mock.env.MockEnvironment;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static com.microsoft.azure.utils.Constants.AZURE_KEYVAULT_CERTIFICATE_PATH;
+import static com.microsoft.azure.utils.Constants.AZURE_KEYVAULT_CLIENT_ID;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertEquals;
+
+public class KeyVaultEnvironmentPostProcessorTest {
+ private KeyVaultEnvironmentPostProcessorHelper keyVaultEnvironmentPostProcessorHelper;
+ private MockEnvironment environment;
+ private MutablePropertySources propertySources;
+ private Map