title: How to add unit tests to Java project in intellij IDEA?
body: <p>I want to create simple java project with JUnit, so for example I'm want to write an algorithm like merge sort or some Java class and create test class so I can make unit test for that class.</p>
  
  <p>I've create the project with: </p>
  
  <blockquote>
    <p>File -> New -> Project -> java -> next and setup the project name and
    location</p>
  </blockquote>
  
  <p>and I want to make the unit test for the class the I've created, and I've tried the following solotions : </p>
  
  <ol>
  <li><a href="https://www.jetbrains.com/help/idea/2016.3/configuring-testing-libraries.html" rel="noreferrer">solution 1 from IntelliJ IDEA dosc</a> using the light bulb to create the test class</li>
  <li><a href="https://stackoverflow.com/questions/4757800/configuring-intellij-idea-for-unit-testing-with-junit">solution 2</a> using shortcut <code>[ctrl + shift + t]</code> </li>
  </ol>
  
  <p>But I always endup with <code>import static org.junit.Assert.*;</code> <strong>cannot resolve symbol 'junit'</strong>, I tried different unit test library end up the same way.</p>
  
  <p>How to resolve this problem so I can make unit test class in this simple Java project?</p>