Code example for ServiceRegistryBuilder

0
	private ClassLoaderService service; 
	private MetadataImpl meta; 
 
	@Before 
	public void setUp() { 
		serviceRegistry = (StandardServiceRegistryImpl) new ServiceRegistryBuilder().buildServiceRegistry(); 
		service = serviceRegistry.getService( ClassLoaderService.class ); 
		meta = (MetadataImpl) new MetadataSources( serviceRegistry ).buildMetadata(); 
	} 
 
	@After 
	public void tearDown() { 
		serviceRegistry.destroy(); 
	} 
 
	@Test 
	public void testSingleFetchProfile() { 
		@FetchProfile(name = "foo", fetchOverrides = { 
				@FetchProfile.FetchOverride(entity = Foo.class, association = "bar", mode = FetchMode.JOIN) 
		})