### Question:
SimpleResourceIdSplitter implements ResourceIdSplitter { @Override public String joinElementsToId(List<String> elements) { Preconditions.checkNotNull(elements, "elements argument"); StringBuilder sb = new StringBuilder(); for (String el : elements) { if (el == null) { continue; } String trimmedEl = el.trim(); if (trimmedEl.length() < 1) { continue; } if (sb.length() > 0) { sb.append(SEPARATOR); } sb.append(trimmedEl); } return sb.toString(); }  @Override List<String> splitIdIntoElements(String id); @Override String joinElementsToId(List<String> elements);  }### Answer:
@Test public void canJoinElementsToId() { assertThat(splitter.joinElementsToId(Lists.newArrayList("a", "b", "c")), is("a:b:c")); assertThat(splitter.joinElementsToId(Lists.newArrayList("a", "", "b")), is("a:b")); assertThat(splitter.joinElementsToId(Lists.newArrayList("a", null, "b")), is("a:b")); assertThat(splitter.joinElementsToId(Lists.newArrayList(" a ", " b ", " ")), is("a:b")); assertThat(splitter.joinElementsToId(Lists.newArrayList("a")), is("a")); assertThat(splitter.joinElementsToId(Lists.newArrayList("")), is("")); }