Code example for ServiceRegistryBuilder

0
 
	private StandardServiceRegistryImpl serviceRegistry;
 
	@Before 
	public void setUp() { 
		serviceRegistry = (StandardServiceRegistryImpl) new ServiceRegistryBuilder().buildServiceRegistry();
	} 
 
	@After 
	public void tearDown() { 
		serviceRegistry.destroy();
	} 
 
	protected ServiceRegistry basicServiceRegistry() {
		return serviceRegistry;
	} 
 
	@Test
	public void testSimpleEntityMapping() { 
		MetadataSources sources = new MetadataSources( serviceRegistry );