title: How to pass command line arguments to Junit Test
body: <p>I have a main class that accepts command line arguments and I am passing this parameter to another class. Now i have to test the myClass with parameters. I have JUnit to test it but I want to know how do pass this in the test </p>
  
  <pre><code>public class JsonFileTest {
      public static void main(String[] fileNames) {
          myClass class = new myClass(fileNames);
      }
  }
  </code></pre>
  
  <p>I am a beginner in JUnit and learning it so if any guidance would be highly appreciated. I need to pass filenames to a class method.</p>