package org.springframework.issues; import junit.framework.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration public class PropertyTest { @Value("${myproperty}") private String property; @Autowired @Qualifier("myPropertyBean") private String propertyBean; @Test public void propertyTest() { Assert.assertEquals("{0}#{1}", property); } @Test public void propertyBeanTest() { Assert.assertEquals("{0}#{1}", propertyBean); } }