If what you want to do is test beans, use a
test framework. Such as
Junit.
JUnit is an external testing system. It does not require modifications to application code to use - and modifications can alter the reliability and security of the application, so it's better to avoid them. You don't need a Main() method, because the Main() for JUnit testing is within JUnit itself.
If you're using a build system such as
Maven, the build system can run unit testing as part of the build process and in many cases even generate reports. Many of the "big ticket" open-source projects are built and tested by Maven.