diff --git a/WEB-INF/src/DAO/IngredientDAO.java b/WEB-INF/src/DAO/IngredientDAO.java
index db01497930a0234627806c6d16e931c17c6523be..ba48122ae837e36dbf72e82ddc9c304fb4871cb0 100644
--- a/WEB-INF/src/DAO/IngredientDAO.java
+++ b/WEB-INF/src/DAO/IngredientDAO.java
@@ -24,17 +24,17 @@ public class IngredientDAO {
     private static final String DELETE_QUERY = "DELETE FROM ingredients WHERE id = ?";
 
     // Method to establish database connection
-    // Method to establish database connection
-    private static void connect() throws IngredientDAOException {
+    static Connection connect() throws IngredientDAOException {
         try {
             connection = DriverManager.getConnection(url, user, password);
         } catch (SQLException e) {
             throw new IngredientDAOException("Error establishing database connection", e);
         }
+        return connection;
     }
 
     // Method to close database connection
-    private static void close() throws IngredientDAOException {
+    public static void close() throws IngredientDAOException {
         try {
             if (resultSet != null) {
                 resultSet.close();
@@ -74,7 +74,7 @@ public class IngredientDAO {
     }
 
     // Method to insert a new ingredient into the database
-    public static void insertIngredient(Ingredient ingredient) throws IngredientDAOException {
+    public static Ingredient insertIngredient(Ingredient ingredient) throws IngredientDAOException {
         try {
             connect();
             preparedStatement = connection.prepareStatement(INSERT_QUERY);
@@ -86,6 +86,7 @@ public class IngredientDAO {
         } finally {
             close();
         }
+        return ingredient;
     }
 
     // Method to retrieve an ingredient by its ID
diff --git a/WEB-INF/src/POJO/Ingredient.java b/WEB-INF/src/POJO/Ingredient.java
index 1202b982bdaafe3a4698083cd0e99a167ff2b030..c560afa9bb1a1f444c3772a99068489c00ca2f45 100644
--- a/WEB-INF/src/POJO/Ingredient.java
+++ b/WEB-INF/src/POJO/Ingredient.java
@@ -14,6 +14,12 @@ public class Ingredient {
     public Ingredient(int id, String name) {
         this(id, name, 0.00);
     }
+    public Ingredient(int id) {
+        this(id, null);
+    }
+    public Ingredient() {
+        this(-1);
+    }
 
     public int getId() {
         return id;
@@ -38,4 +44,8 @@ public class Ingredient {
     public void setPrice(double price) {
         this.price = price;
     }
+
+    public boolean isEmpty() {
+        return id == -1 && name == null && price == 0.0;
+    }
 }
diff --git a/WEB-INF/test/DAO/IngredientDAOTest.java b/WEB-INF/test/DAO/IngredientDAOTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..cbb2c324dcb8cbdfb2f9747c4a116fead2d84f8a
--- /dev/null
+++ b/WEB-INF/test/DAO/IngredientDAOTest.java
@@ -0,0 +1,85 @@
+package DAO;
+
+import Exceptions.IngredientDAOException;
+import POJO.Ingredient;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.List;
+
+public class IngredientDAOTest {
+
+    private IngredientDAO dao;
+    private Connection connection;
+
+    @BeforeEach
+    public void setUp() throws IngredientDAOException {
+        dao = new IngredientDAO();
+        connection = IngredientDAO.connect();
+    }
+
+    @Test
+    public void testGetAllIngredients() throws IngredientDAOException {
+        List<Ingredient> ingredients = dao.getAllIngredients();
+        assertFalse(ingredients.isEmpty());
+    }
+
+    @Test
+    public void testGetIngredient() throws IngredientDAOException {
+        Ingredient ingredient = IngredientDAO.getIngredient(1);
+        assertFalse(ingredient.isEmpty());
+    }
+
+    @Test
+    public void testInsertIngredient() throws IngredientDAOException {
+        String name = "Test Ingredient";
+        double price = 1.5;
+
+        Ingredient newIngredient = new Ingredient();
+        newIngredient.setName(name);
+        newIngredient.setPrice(price);
+
+        Ingredient savedIngredient = IngredientDAO.insertIngredient(newIngredient);
+
+        assertTrue(savedIngredient.getId() > 0);
+
+        Ingredient retrievedIngredient = IngredientDAO.getIngredient(savedIngredient.getId());
+        assertEquals(name, retrievedIngredient.getName());
+        assertEquals(price, retrievedIngredient.getPrice());
+    }
+
+    @Test
+    public void testDeleteIngredient() throws IngredientDAOException {
+        Ingredient ingredient = new Ingredient();
+        ingredient.setName("Test Ingredient");
+        ingredient.setPrice(1.5);
+        IngredientDAO.insertIngredient(ingredient);
+        dao.deleteIngredient(ingredient.getId());
+        Ingredient deletedIngredient = IngredientDAO.getIngredient(ingredient.getId());
+        assertTrue(deletedIngredient.isEmpty());
+    }
+
+    @Test
+    public void testConnect() throws IngredientDAOException {
+        assertNotNull(IngredientDAO.connect());
+    }
+
+    @Test
+    public void testClose() throws IngredientDAOException {
+        IngredientDAO.close();
+        assertNull(IngredientDAO.connect());
+    }
+
+    @AfterEach
+    public void tearDown() throws SQLException {
+        if (connection != null) {
+            connection.close();
+        }
+    }
+}
+
diff --git a/pom.xml b/pom.xml
index f87c195560769c5bfa7d1983c2e0b766734fa961..41009249080c972879cb287a9c29462e075f5b56 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,6 +25,24 @@
             <artifactId>javax.servlet-api</artifactId>
             <version>3.1.0</version>
         </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>RELEASE</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
+            <version>RELEASE</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <version>5.10.2</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>