ConverterHelper { String withPath(String[] path) { StringBuilder sb = new StringBuilder(); if (path.length > 0) { sb.append(" (with path "); for (int i = 0; i < path.length - 1; i++) { sb.append(path[i]); sb.append("."); } sb.append(path[path.length - 1]); sb.append(") "); } return sb.toString(); }  ToConverter getToConverter(Class toClass, Class domainClass);  }
@Test public void testWithPath() throws Exception { assertThat(converterHelper.withPath(new String[]{"parts", "to", "add"})).isEqualTo(" (with path parts.to.add) "); }