HHH-13704 Test Javassist is not on the classpath

This commit is contained in:
Davide D'Alto 2019-11-11 11:13:00 +00:00
parent 76d2672122
commit c3ccc65275
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
/*
* 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 http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.optional.javassist;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static org.junit.Assert.assertNull;
public class OptionalJavassistDependencyTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test
public void shouldNotBeOnTheClasspath() throws Exception {
thrown.expect( ClassNotFoundException.class );
Class<?> aClass = getClass().getClassLoader().loadClass( "javassist.util.proxy.Proxy" );
}
}