package eu.dnetlib.r2d2.neo4j;

import javax.annotation.Resource;

import org.apache.log4j.BasicConfigurator;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"/eu/dnetlib/r2d2/neo4j/applicationContext-neo4j.xml", "/eu/dnetlib/r2d2/neo4j/applicationContext-r2d2-neo4j-test.xml"})
public class TestInterceptor extends AbstractAnnotationAwareTransactionalTests {

	@Resource private InterceptedBean bean = null;
	
	@BeforeClass
	public static void setup() {
		BasicConfigurator.configure();
	}
	
	@Test
	public void test() {
		bean.first();
		bean.firstAndAHalf();
		bean.second();
		bean.third();
	}
}
