diff --git a/neo4j/src/test/java/org/hibernate/ogm/datastore/neo4j/test/remote/RemoteAuthenticationFailureTest.java b/neo4j/src/test/java/org/hibernate/ogm/datastore/neo4j/test/remote/RemoteAuthenticationFailureTest.java index 1225e393cb..cbb48af6ae 100644 --- a/neo4j/src/test/java/org/hibernate/ogm/datastore/neo4j/test/remote/RemoteAuthenticationFailureTest.java +++ b/neo4j/src/test/java/org/hibernate/ogm/datastore/neo4j/test/remote/RemoteAuthenticationFailureTest.java @@ -49,9 +49,8 @@ public void testAuthenticationFailureAtStartUp() throws Exception { connectToRemoteDatastore( properties ); fail( "Credentials should be invalid" ); } - catch (Exception e) { + catch (HibernateException e) { // Unable to start datastore provider - assertThat( e ).isInstanceOf( HibernateException.class ); assertThat( e.getMessage() ).startsWith( "OGM000071" ); assertThat( e.getCause().getMessage() ).startsWith( "OGM001419" ); assertThat( e.getCause().getMessage() ).contains( "Unauthorized" );