### Question:
CellarUtils { public static String createStringFromSet(Set<String> items, boolean mergeable) { StringBuilder builder = new StringBuilder(); Iterator<String> iterator = items.iterator(); while (iterator.hasNext()) { builder.append(iterator.next()); if (iterator.hasNext()) { builder.append(","); } } if (mergeable) { return String.format(MERGABLE, builder.toString()); } else { return builder.toString(); } }  static boolean isMergable(String s); static Set<String> createSetFromString(String text); static String createStringFromSet(Set<String> items, boolean mergeable); static boolean collectionEquals(Collection col1, Collection col2); static boolean collectionSubset(Collection source, Collection target); static String getConfigurationProperty(ConfigurationAdmin configurationAdmin, String configurationId,
            String propertyKey, String defaultValue); static boolean doCleanupResourcesNotPresentInCluster(ConfigurationAdmin configurationAdmin); static final String MERGABLE; static final String MERGABLE_REGEX; }### Answer:
@Test public void testStringFromSet() { Set<String> itemSet = new LinkedHashSet<String>(); String items = "item1,item2"; itemSet.add("item1"); itemSet.add("item2"); String result = CellarUtils.createStringFromSet(itemSet,false); Assert.assertEquals(items,result); result = CellarUtils.createStringFromSet(itemSet,true); Assert.assertEquals(String.format(CellarUtils.MERGABLE,items),result); }