List<String> arguments = Arrays.asList("arg1", "", "arg2");
List<String> jvmArguments = Arrays.asList("jvmarg1", "", "jvmarg2");
boolean nonBlocking = false;
PredefinedTask task = new PredefinedTask(displayName, taskNames, arguments, jvmArguments, nonBlocking);
GradleCommandTemplate commandTemplate = task.toCommandTemplate();
assertEquals(Arrays.asList("task1", "", "task2"), commandTemplate.getTasks());
assertEquals(arguments, commandTemplate.getArguments());
assertEquals(jvmArguments, commandTemplate.getJvmArguments());
assertTrue(commandTemplate.isBlocking());
}