}
public void testGetCommandline() throws Exception {
Project project = new Project();
ProcessTester server = new ProcessTester();
XhJavaTask task = new XhJavaTask();
task.setProject(project);
task.setClassname(ProcessTester.class.getName());
Path path = new Path(project, getClassPath());
task.setClasspath(path);
task.createArg().setLine("-p " + server.getPort());
task.createArg().setLine("-s user.dir");
task.execute();
assertContains("Wrong commandline", JVM.toLowerCase(), task.getCommandline().toLowerCase());
assertContains("Wrong commandline", " -classpath ", task.getCommandline());
assertContains("Wrong commandline", ProcessTester.class.getName(), task.getCommandline());
assertContains("Wrong commandline", " -p " + server.getPort(), task.getCommandline());
assertContains("Wrong commandline", " -s user.dir", task.getCommandline());
}