@@ -0,0 +1,2181 @@
+/*%0A * Copyright 2002-2016 the original author or authors.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.springframework.test.context.env;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.beans.factory.annotation.Value;%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.context.support.PropertySourcesPlaceholderConfigurer;%0Aimport org.springframework.core.env.Environment;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.springframework.test.context.TestPropertySource;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0A%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * Integration tests for %7B@link TestPropertySource @TestPropertySource%7D support with%0A * inlined properties that overrides properties files.%0A *%0A * @author Sam Brannen%0A * @since 4.3%0A */%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@ContextConfiguration%0A@TestPropertySource(locations = %22explicit.properties%22, properties = %22explicit = inlined%22)%0Apublic class InlinedPropertiesOverridePropertiesFilesTestPropertySourceTests %7B%0A%0A%09@Autowired%0A%09Environment env;%0A%0A%09@Value(%22$%7Bexplicit%7D%22)%0A%09String explicit;%0A%0A%0A%09@Test%0A%09public void inlinedPropertyOverridesValueFromPropertiesFile() %7B%0A%09%09assertEquals(%22inlined%22, env.getProperty(%22explicit%22));%0A%09%09assertEquals(%22inlined%22, this.explicit);%0A%09%7D%0A%0A%0A%09@Configuration%0A%09static class Config %7B%0A%0A%09%09@Bean%0A%09%09public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() %7B%0A%09%09%09return new PropertySourcesPlaceholderConfigurer();%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Verify inlined props override files in @TestPropertySource