ConfigUtil { public static String labelize(String name) { StringBuilder label = new StringBuilder(); for (char c : name.toCharArray()) { if (Character.isUpperCase(c) && label.length() > 0) label.append(' '); label.append(label.length() == 0 ? Character.toUpperCase(c) : c); } return label.toString(); } private  ConfigUtil(); @SuppressWarnings("unchecked") static synchronized ConfigWrapper<C> wrapperFor(Class<C> targetClass); @SuppressWarnings("unchecked") static void parseUri(C configObject, String uri); @SuppressWarnings("unchecked") static String generateUri(C configObject); static ConfigWrapper<?> storageConfigWrapperFor(String uri); static ConfigWrapper<?> filterConfigWrapperFor(String cliName); static Iterable<ConfigWrapper<?>> allStorageConfigWrappers(); static Iterable<ConfigWrapper<?>> allFilterConfigWrappers(); static String hyphenate(String name); static String labelize(String name); @SuppressWarnings("unchecked") static String summarize(C configObject); static void validate(Object configObject); static org.apache.commons.cli.Option cliOptionFromAnnotation(PropertyDescriptor descriptor,
                                                                        Option _option,
                                                                        String prefix); static String join(String[] parts); static final String XML_NAMESPACE; }
@Test public void testLabelize() { Assert.assertEquals("Foo Bar Baz", ConfigUtil.labelize("fooBarBaz")); Assert.assertEquals("Foo Bar Baz", ConfigUtil.labelize("FooBarBaz")); }