package Database;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.sql.Connection;

import static org.junit.Assert.*;

public class DatabaseConnectorTest {

    DatabaseConnector databaseConnector;

    @Before
    public void setUp() throws Exception {
        databaseConnector = new DatabaseConnector(Config.URL.toString(), Config.USERNAME.toString(), Config.PASSWORD.toString(), Config.DATABASE.toString());
    }

    @After
    public void tearDown() throws Exception {

    }

    @Test
    public void testConnect() throws Exception {
        Connection connection = null;
        try {
            connection = databaseConnector.connect();
            assertNotNull(connection);
        } catch (Exception e) {
            assertTrue(e.toString().contains("SQLException"));
            assertNull(connection);
        }
    }

    @Test
    public void testDisconnect() throws Exception {
        Connection connection = null;
        try {
            databaseConnector.connect();
            assertTrue(databaseConnector.isActive());
            databaseConnector.disconnect();
            assertFalse(databaseConnector.isActive());
        } catch (Exception e) {
            assertTrue(e.toString().contains("SQLException"));
            assertNull(connection);
        }
    }
}
package Database;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class DatabaseConnectorTest {

    @Before
    public void setUp() throws Exception {

    }

    @After
    public void tearDown() throws Exception {

    }

    @Test
    public void testConnect() throws Exception {

    }

    @Test
    public void testDisconnect() throws Exception {

    }
}
--- 
+++ 
@@ -4,13 +4,17 @@
 import org.junit.Before;
 import org.junit.Test;
 
+import java.sql.Connection;
+
 import static org.junit.Assert.*;
 
 public class DatabaseConnectorTest {
 
+    DatabaseConnector databaseConnector;
+
     @Before
     public void setUp() throws Exception {
-
+        databaseConnector = new DatabaseConnector(Config.URL.toString(), Config.USERNAME.toString(), Config.PASSWORD.toString(), Config.DATABASE.toString());
     }
 
     @After
@@ -20,11 +24,27 @@
 
     @Test
     public void testConnect() throws Exception {
-
+        Connection connection = null;
+        try {
+            connection = databaseConnector.connect();
+            assertNotNull(connection);
+        } catch (Exception e) {
+            assertTrue(e.toString().contains("SQLException"));
+            assertNull(connection);
+        }
     }
 
     @Test
     public void testDisconnect() throws Exception {
-
+        Connection connection = null;
+        try {
+            databaseConnector.connect();
+            assertTrue(databaseConnector.isActive());
+            databaseConnector.disconnect();
+            assertFalse(databaseConnector.isActive());
+        } catch (Exception e) {
+            assertTrue(e.toString().contains("SQLException"));
+            assertNull(connection);
+        }
     }
 }
Add Tests to DatabaseConnectionTest class
