diff --git a/hibernate-envers/src/test/java/org/hibernate/envers/test/integrator/BasicIntegratorTest.java b/hibernate-envers/src/test/java/org/hibernate/envers/test/integrator/BasicIntegratorTest.java new file mode 100644 index 0000000000..e4930b0c16 --- /dev/null +++ b/hibernate-envers/src/test/java/org/hibernate/envers/test/integrator/BasicIntegratorTest.java @@ -0,0 +1,45 @@ +/* + * Hibernate, Relational Persistence for Idiomatic Java + * + * License: GNU Lesser General Public License (LGPL), version 2.1 or later. + * See the lgpl.txt file in the root directory or . + */ +package org.hibernate.envers.test.integrator; + +import javax.persistence.Entity; +import javax.persistence.Id; + +import org.hibernate.cfg.Configuration; + +import org.hibernate.testing.TestForIssue; +import org.junit.Test; + +/** + * @author Steve Ebersole + */ +public class BasicIntegratorTest { + /** + * Tests that nothing crazy happens if the hibernate-envers jar happens + * to be on the classpath but we have no audited entities + */ + @Test + @TestForIssue( jiraKey = "HHH-9675" ) + public void testNoAudited() { + new Configuration().buildSessionFactory().close(); + new Configuration().addAnnotatedClass( SimpleNonAuditedEntity.class ).buildSessionFactory().close(); + } + + @Entity + public static class SimpleNonAuditedEntity { + private Integer id; + + @Id + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + } +}