@Test
public void testJoinNonEmpty() {

    assertEquals("Separate this character",
            joinNonEmpty(new String[]{"", "Separate", "this", null, "character", "", null}, ' '));
    assertEquals("",
            joinNonEmpty(new String[]{}, 'x'));
    assertEquals("//",
            joinNonEmpty(new String[]{"//"}, 'x'));
    assertEquals("//",
            joinNonEmpty(new String[]{null, "//", null}, 'x'));
    assertEquals("///",
            joinNonEmpty(new String[]{"/", "", "/", null}, '/'));
    assertEquals("/,2",
            joinNonEmpty(new String[]{"/", "   ", "2", null}, ','));
}