@Test
public void testSplit() throws Exception {

    String[] array = StringUtils.split(null, ",");
    Assert.assertTrue(CommonUtils.isEmpty(array));
    array = StringUtils.split("", ",");
    Assert.assertTrue(CommonUtils.isEmpty(array));
    String src = "1;2;3";
    array = StringUtils.split(src, null);
    Assert.assertTrue(array.length == 1);
    array = StringUtils.split(src, ",");
    Assert.assertTrue(array.length == 1);
    src = "1;2;3";
    array = StringUtils.split(src, ";");
    Assert.assertTrue(array.length == 3);
    Assert.assertArrayEquals(array, new String[] { "1", "2", "3" });
    src = ";1;2;3;";
    array = StringUtils.split(src, ";");
    Assert.assertTrue(array.length == 5);
    Assert.assertArrayEquals(array, new String[] { "", "1", "2", "3", "" });
    src = "; 1;2 ; 3 ;";
    array = StringUtils.split(src, ";");
    Assert.assertTrue(array.length == 5);
    Assert.assertArrayEquals(array, new String[] { "", " 1", "2 ", " 3 ", "" });
}