Inflector { public static String camelize(String s) { StringBuffer name = new StringBuffer(); for (String part : s.split(" |_")) { name.append(Inflector.capitalize(part)); } return name.toString(); } private  Inflector(); static String underscore(String camelCased); static String camelize(String s); static String humanize(String camelCased); static String capitalize(String str); static String uncapitalize(String str);  }
@Test public void testCamelize() { Assert.assertEquals("TestOne", Inflector.camelize("test_one")); }
@Test public void testCamelizeSpaces() { Assert.assertEquals("TestOne", Inflector.camelize("test one")); }
@Test public void testCamelizeWithTwo() { Assert.assertEquals("TestOneTwo", Inflector.camelize("test_one_two")); }
@Test public void testCamelizeWithTwoSpaces() { Assert.assertEquals("TestOneTwo", Inflector.camelize("test one two")); }