How do I write JUnit test cases in Intellij?
Go to editor and select the production code. Choose the class for creating a test. Choose Alt+Enter. Now choose Create Test. Choose the library of your choice after you create Test dialog. Download it if you don’t have any library yet.