# Adding Test Classes

Add the JUnit dependency to pom.xml, then let IntelliJ generate a test class for the class you want to test.

![Cheat sheet: Adding Test Classes](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/a4659e41844046c6af6f7388c67c3e0e.webp)

- Category: Java
- Level: Apprentice
- Tags: java, unit testing
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/unit-testing-adding-test-classes-cheat-sheet
