title: How to run a test class in a jar file from command line?
body: <p>The structure of my SpringBoot project is:</p>
  <p><a href="https://i.stack.imgur.com/w3K5m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w3K5m.png" alt="enter image description here" /></a></p>
  <p>There is no main class, and I have compiled the project into a <code>jar</code> file.</p>
  <p>Now I want to run a method named &quot;testEmailSending&quot; in the test class shown in the very last line of the screenshot, <code>Send1000EmailsIn24hours</code>, from the <code>jar</code> file from command line.</p>
  <p>The reason why I want to run this test in a <code>jar</code> file is that the whole project is just a test, but I think that since it is a test, so I shouldn't put the code in the <code>main</code> class, instead, putting it in a test would be better.</p>
  <p>I am not sure if this is correct. Should I put the code for testing just in the main class?</p>