@Test
public void testJoin() {

    assertNull(StringUtils.join(null, ','));
    assertEquals("", StringUtils.join(new String[0], ','));
    assertEquals("foo", StringUtils.join(new String[] { "foo" }, ','));
    assertEquals("foo,bar",
            StringUtils.join(new String[] { "foo", "bar" }, ','));
    assertEquals("foo,bar,baz",
            StringUtils.join(new String[] { "foo", "bar", "baz" }, ','));
    assertEquals("foo,null,baz",
            StringUtils.join(new String[] { "foo", null, "baz" }, ','));
    assertEquals("foo,,baz",
            StringUtils.join(new String[] { "foo", "", "baz" }, ','));
}