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