Java Test-Driven Development Setup
Setup
Launch the IntelliJ IDEA application.
Select the New Project option.
Name the project java-test-driven-development.
Create the project in the ~/code/ga/lectures directory.
⚠️ Windows users, the
lecturesdirectory is likely at this location on your device:C:\Users\username\code\ga\lectures(replacingusernamewith your username). Create the project in that directory instead.
Choose the Maven build system option.
Ensure the JDK used is temurin-17. This should be the default setting when starting a new project. If it’s not, alert your instructor.
Ensure that the Add sample code option is not checked.
After confirming that the New Project window looks similar to the screenshot below, select the Create button. The name of the project should be java-test-driven-development, not untitled.

Right-click on the src/main/java directory and select New > Java Class, as shown in the screenshot below:

Name your new class org.example.Main as shown below.

When your New Java Class prompt looks like the above, select the Class option from the list. You should be taken to the new Main.java file.
Add the required main() method inside of the Main class, including a print statement to confirm our setup worked:
public static void main(String[] args) {
System.out.println("This works!");
}
Run this file now to test that our setup worked. Use the green play button in the top bar, or use Ctrl + R.

A Run panel will appear at the bottom of the window, and you should see a message: This works!
We can get to work now that our project is set up.