UserDefined implements XMLConvertible { public static UserDefined fromBoolean(final String name, final boolean value) { return new UserDefined(name, MetaValueType.BOOLEAN, String.valueOf(value)); } UserDefined(final String name, final MetaValueType valueType, final String value); static UserDefined fromBoolean(final String name, final boolean value); static UserDefined fromDate(final String name, final Date value); static UserDefined fromFloat(final String name, final Number value); static UserDefined fromTime(final String name, final Date value); static UserDefined fromString(final String name, final String value); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable);  }
@Test public void fromBoolean() throws IOException { TestHelper.assertXMLEquals( "<meta:user-defined meta:name=\"b\" meta:type=\"boolean\">true</meta:user-defined>", UserDefined.fromBoolean("b", true)); }