I saw an answer for a template creating a basic test class, and here are some individual calls if you prefer this approach instead:
Create setUp method with @Before import
${:import(org.junit.Before)}
@Before
public final void setUp() {
${cursor}
}
Create new test method with @Test import
${:import(org.junit.Test)}
@Test
public final void test${newName} () {
${cursor}
}
I use the following for helping with JAXB conversions between types and DTOs:
Template for converting existing variable to return value type (works with parameter)
${return_type} ${name} = null;
if (${var} != null) {
${name} = new ${return_type}();
${cursor}
}
return ${name};