diff --git a/core-java/src/main/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionExample.java b/core-java/src/main/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionExample.java deleted file mode 100644 index 26d306d03f..0000000000 --- a/core-java/src/main/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionExample.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.baeldung.classnotfoundexception; - -public class ClassNotFoundExceptionExample { - public void loadDrivers() throws ClassNotFoundException { - Class.forName("oracle.jdbc.driver.OracleDriver"); - } -} diff --git a/core-java/src/test/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionTest.java b/core-java/src/test/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionTest.java index 2a16b7effd..a6104e635b 100644 --- a/core-java/src/test/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionTest.java +++ b/core-java/src/test/java/com/baeldung/classnotfoundexception/ClassNotFoundExceptionTest.java @@ -6,7 +6,6 @@ public class ClassNotFoundExceptionTest { @Test(expected = ClassNotFoundException.class) public void givenNoDriversInClassPath_whenLoadDrivers_thenClassNotFoundException() throws ClassNotFoundException { - ClassNotFoundExceptionExample test = new ClassNotFoundExceptionExample(); - test.loadDrivers(); + Class.forName("oracle.jdbc.driver.OracleDriver"); } }