diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/uniqueconstraint/UniqueConstraintValidationTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/uniqueconstraint/UniqueConstraintValidationTest.java index ffab1eff4f..d6c8229201 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/uniqueconstraint/UniqueConstraintValidationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/uniqueconstraint/UniqueConstraintValidationTest.java @@ -42,7 +42,7 @@ public class UniqueConstraintValidationTest extends BaseUnitTestCase { cfg.addAnnotatedClass(entity); cfg.buildMappings(); ServiceRegistryImplementor serviceRegistry = (ServiceRegistryImplementor) new StandardServiceRegistryBuilder() - .applySettings(cfg.getProperties()).buildServiceRegistry(); + .applySettings(cfg.getProperties()).build(); cfg.buildSessionFactory(serviceRegistry); }