ItemUtils { public static String toItemsString(final List<Integer> items) { return items.isEmpty() ? "" : Joiner.on(ItemUtils.DELIMITER).join(items); }  static List<Integer> toItemList(final String itemsString); static String toItemsString(final List<Integer> items);  }
@Test public void assertToItemsStringWhenEmpty() { assertThat(ItemUtils.toItemsString(Collections.<Integer>emptyList()), is("")); }
@Test public void assertToItemsString() { assertThat(ItemUtils.toItemsString(Arrays.asList(0, 1, 2)), is("0,1,2")); }