param(list(attr("type", "String"),
attr("default", "\"xyzzy\""),
attr("name", "s")))));
ReparentedTree output = reparent(parseTree);
assertOneRoot(output);
Template root = getTemplate(output.getRoot());
assertEquals(TEMPLATE_NAME, root.getName());
assertEquals(0, root.getImports().size());
List<Parameter> params = root.getParameters();
assertEquals(2, params.size());
assertEquals("x", params.get(0).getPrimaryName());
assertEquals("int",
((NativeType) params.get(0).getType()).getNativeType(OutputLanguage.JAVA));
assertEquals(null, params.get(0).getDefaultValue());
assertEquals("s", params.get(1).getPrimaryName());
assertEquals("String",
((NativeType) params.get(1).getType()).getNativeType(OutputLanguage.JAVA));
Expression defValue = params.get(1).getDefaultValue();
assertEquals("\"xyzzy\"", ((NativeExpression) defValue).getDefaultNativeCode());
assertEmptyValue(root.getContent());
}