// private static Logger log = LoggerFactory.getLogger(TestAnnotationIoc.class);
public static ApplicationContext applicationContext = new XmlApplicationContext("annotation-config.xml");
@Test
public void testFieldInject() {
FieldInject fieldInject = applicationContext.getBean("fieldInject");
Assert.assertThat(fieldInject.add(5, 4), is(9));
Assert.assertThat(fieldInject.add2(5, 4), is(9));
fieldInject = applicationContext.getBean(FieldInject.class);
Assert.assertThat(fieldInject.add(5, 4), is(9));
Assert.assertThat(fieldInject.add2(5, 4), is(9));
}