TypeAttribute xml = (TypeAttribute) TypeAttribute.getInstance(TypeAttribute.class, "xml");
FormatterElement formatter = new FormatterElement();
formatter.setProject(mxtest.getProject());
formatter.setType(xml);
junit.addFormatter(formatter);
// configure properties from Moxie file
MaxmlMap testAttributes = mxtest.getBuild().getConfig().getTaskAttributes("junit");
if (testAttributes != null) {
AttributeReflector.setAttributes(mxtest.getProject(), junit, testAttributes);