It does not seem to be directly available.
The idea has been raised to save a file (like a JUnit empty file) as a template, to reuse it at future (JUnit for instance) creation time.
This is bug 37440… and it is not very popular (since 2003!). And in WON'T FIX
status…
The closest would be
Window > Preferences > Java > Editor - Templates
and look under “test method (JUnit4)”
However, as mentioned in this thread:
but that will not affect the auto-generated JUnit test method stub templates.
In other words in theNew JUnit Test Case
dialog, one can select the methods of the class under test and test methods stubs are auto-generated.
To modify the template that creates these JUnit test method stubs… seems not possible at the moment.
Bug 71783 is somewhat related to this issue, regarding the comment templates of those methods.
Note: the generation of the JUnit class itself seems entirely hard-coded in the class
org.eclipse.jdt.junit.wizards.NewTestCaseWizardPageOne
Speaking of template, you also needed to to provide VM arguments to all JUnit tests you run, manually copying them for every new configuration.
Bug 37862 has been set to address that and allow to create a Installed JRE for use with a JUnit testing, configuring it with the correct set of VM arguments.