### Question:
StringUtil { public static <T> String join(String separator, Iterable<T> iterable) { final StringBuilder buff = new StringBuilder(); String sep = ""; for (T item : iterable) { buff.append(sep).append(item.toString()); sep = separator; } return buff.toString(); }  static String join(String separator, Iterable<T> iterable);  }### Answer:
@Test public void joinShouldReturnEmptyStringIfIterableIsEmpty() { assertThat(join(",", new ArrayList<String>())).isEqualTo(""); }
@Test public void joinShouldReturnToStringOfContainedObjectIfOnlyOneAvailable() { assertThat(join(",", Collections.singletonList(new TestClass(9, "hello")))).isEqualTo("hello-9"); }
@Test public void joinShouldReturnTheExpectedSeparatedStringWithManyElements() { assertThat(join(";", Arrays.asList(new TestClass(10, "foo"), new TestClass(41, "bar")))) .isEqualTo("foo-10;bar-41"); }