### Question:
EnumUtils { public static String join(final Enum<? extends Enum>[] array, final String on) { if (array == null || array.length < 1) { return ""; } final StringBuilder sb = new StringBuilder(); for (int i = 0, l = array.length; i < l; ++i) { sb.append(array[i].toString()); if (i < l - 1) { sb.append(on); } } return sb.toString(); } private  EnumUtils(); static String join(final Enum<? extends Enum>[] array, final String on); static String join(final Enum<? extends Enum>[] array);  }### Answer:
@Test public void testEmpty() { assertThat(EnumUtils.join(new TestEnum[]{}, ","), equalTo("")); }
@Test public void testDefaultName() { assertThat(EnumUtils.join(TestEnum.values(), ","), equalTo("ONE,TWO,THREE")); }
@Test public void testSubset() { assertThat(EnumUtils.join(new TestEnum[]{TestEnum.ONE, TestEnum.TWO}, "$"), equalTo("ONE$TWO")); }
@Test public void testOverriddenToString() { assertThat(EnumUtils.join(TestNamedEnum.values(), ","), equalTo("one,two,three")); }