@Test
public void toCamelCase() {

    assertNull(StringUtil.toCamelCase(null));
    assertEquals("", StringUtil.toCamelCase(""));
    assertEquals("a", StringUtil.toCamelCase("A"));
    assertEquals("a", StringUtil.toCamelCase("a"));
    assertEquals("ab", StringUtil.toCamelCase("AB"));
    assertEquals("ab", StringUtil.toCamelCase("Ab"));
    assertEquals("aB", StringUtil.toCamelCase("aB"));
    assertEquals("ab", StringUtil.toCamelCase("ab"));
    assertEquals("aB", StringUtil.toCamelCase("A_B"));
    assertEquals("aB", StringUtil.toCamelCase("A_b"));
    assertEquals("aB", StringUtil.toCamelCase("a_B"));
    assertEquals("aB", StringUtil.toCamelCase("a_b"));
    assertEquals("aBc", StringUtil.toCamelCase("aBc"));
    assertEquals("aBcDef", StringUtil.toCamelCase("  aBc def "));
    assertEquals("aBcDef", StringUtil.toCamelCase("aBcDef"));
    assertEquals("aBcDefGhi", StringUtil.toCamelCase("aBc def_ghi"));
    assertEquals("aBcDefGhi", StringUtil.toCamelCase("aBcDefGhi"));
    assertEquals("aBcDefGhi123", StringUtil.toCamelCase("aBc def_ghi 123"));
    assertEquals("aBcDefGhi123", StringUtil.toCamelCase("aBcDefGhi123"));
    assertEquals("aBcDefGhi123", StringUtil.toCamelCase("aBcDEFGhi123"));
    assertEquals("123ABcDefGhi", StringUtil.toCamelCase("123aBcDEFGhi")); // 数字开始
    // 不保留下划线
    assertEquals("ab", StringUtil.toCamelCase("__AB__"));
    assertEquals("ab", StringUtil.toCamelCase("__Ab__"));
    assertEquals("aB", StringUtil.toCamelCase("__aB__"));
    assertEquals("ab", StringUtil.toCamelCase("__ab__"));
    assertEquals("aB", StringUtil.toCamelCase("__A__B__"));
    assertEquals("aB", StringUtil.toCamelCase("__A__b__"));
    assertEquals("aB", StringUtil.toCamelCase("__a__B__"));
    assertEquals("aB", StringUtil.toCamelCase("__a__b__"));
    // 保留除下划线以外的其它分隔符
    assertEquals("..ab..", StringUtil.toCamelCase("..AB.."));
    assertEquals("..ab..", StringUtil.toCamelCase("..Ab.."));
    assertEquals("..aB..", StringUtil.toCamelCase("..aB.."));
    assertEquals("..ab..", StringUtil.toCamelCase("..ab.."));
    assertEquals("..a..b..", StringUtil.toCamelCase("..A..B.."));
    assertEquals("..a..b..", StringUtil.toCamelCase("..A..b.."));
    assertEquals("..a..b..", StringUtil.toCamelCase("..a..B.."));
    assertEquals("..a..b..", StringUtil.toCamelCase("..a..b.."));
    assertEquals("..a..123B..", StringUtil.toCamelCase("..A..123B.."));
    assertEquals("..a..123B..", StringUtil.toCamelCase("..A..123b.."));
    assertEquals("..a..123B..", StringUtil.toCamelCase("..a..123B.."));
    assertEquals("..a..123B..", StringUtil.toCamelCase("..a..123b.."));
    assertEquals("fmh.m.0.n", StringUtil.toCamelCase("_fmh.m._0.n"));
    assertEquals("aaa-bbb-ccc", StringUtil.toCamelCase("aaa-bbb-ccc"));
}