### Question:
CommandLineUsage { static void convertParameterFieldToDom(Field paramField, DomElement parametersElem) { final int mod = paramField.getModifiers(); if (Modifier.isTransient(mod) || Modifier.isFinal(mod) || Modifier.isStatic(mod)) { return; } final Parameter parameter = paramField.getAnnotation(Parameter.class); final boolean thisIsAnOperator = Operator.class.isAssignableFrom(paramField.getDeclaringClass()); if (thisIsAnOperator && parameter != null || !thisIsAnOperator) { String name = paramField.getName(); if (parameter != null && !parameter.alias().isEmpty()) { name = parameter.alias(); } if (paramField.getType().isArray() && parameter != null && !parameter.itemAlias().isEmpty()) { DomElement childElem = parameter.itemsInlined() ? parametersElem : parametersElem.createChild(name); String itemName = parameter.itemAlias(); final DomElement element = childElem.createChild(itemName); if (isConverterAvailable(paramField.getType(), parameter)) { element.setValue(getTypeName(paramField.getType().getComponentType())); } else { final Field[] declaredFields = paramField.getType().getComponentType().getDeclaredFields(); for (Field declaredField : declaredFields) { convertParameterFieldToDom(declaredField, element); } } childElem.createChild("..."); } else { final DomElement childElem = parametersElem.createChild(name); Class<?> type = paramField.getType(); if (isConverterAvailable(type, parameter)) { childElem.setValue(getTypeName(type)); } else { final Field[] declaredFields = type.getDeclaredFields(); for (Field declaredField : declaredFields) { convertParameterFieldToDom(declaredField, childElem); } } } } }  static String getUsageText(); static String getUsageTextForGraph(String path, CommandLineContext commandLineContext); static String getUsageTextForOperator(String operatorName);  }### Answer:
@Test public void testConvertParameterFieldToDom() throws NoSuchFieldException { DefaultDomElement parent = new DefaultDomElement("parent"); CommandLineUsage.convertParameterFieldToDom(Foo.class.getDeclaredField("x"), parent); assertEquals("<parent>\n" + " <z>float</z>\n" + "</parent>", parent.toXml()); parent = new DefaultDomElement("parent"); CommandLineUsage.convertParameterFieldToDom(Foo.class.getDeclaredField("y"), parent); assertEquals("<parent>\n" + " <y>string</y>\n" + "</parent>", parent.toXml()); parent = new DefaultDomElement("parent"); CommandLineUsage.convertParameterFieldToDom(Foo.class.getDeclaredField("bar"), parent); assertEquals("<parent>\n" + " <bar>\n" + " <c>float</c>\n" + " <b>string</b>\n" + " </bar>\n" + "</parent>", parent.toXml()); }