@Test public void testCat() { String foo = "foo"; String bar = "bar"; String rnd = String.valueOf(new Random().nextInt()); String str = foo + Service.delimiter + bar + Service.delimiter + rnd; List<String> decat = Service.decat(str); assertEquals(3, decat.size(), 0.0); assertEquals(str, Service.cat(decat)); assertEquals(0, Service.decat("").size(), 0.0); assertEquals(0, Service.decat(null).size(), 0.0); }
protected static String cat(List<String> strings) { String str = ""; if (strings == null) { return str; } for (String s : strings) { if (!str.isEmpty()) { str += delimiter; } str += s; } return str; }
Service { protected static String cat(List<String> strings) { String str = ""; if (strings == null) { return str; } for (String s : strings) { if (!str.isEmpty()) { str += delimiter; } str += s; } return str; } }
Service { protected static String cat(List<String> strings) { String str = ""; if (strings == null) { return str; } for (String s : strings) { if (!str.isEmpty()) { str += delimiter; } str += s; } return str; } Service();  Service(String serviceId, String slaXmlOptions, URI fileServerHost, List<String> files); }
Service { protected static String cat(List<String> strings) { String str = ""; if (strings == null) { return str; } for (String s : strings) { if (!str.isEmpty()) { str += delimiter; } str += s; } return str; } Service();  Service(String serviceId, String slaXmlOptions, URI fileServerHost, List<String> files); int getId(); void setId(int id); String getServiceId(); void setServiceId(String serviceId); String getSlaXmlOptions(); void setSlaXmlOptions(String slaXmlOptions); URI getFileServerHost(); void setFileServerHost(URI fileServerHost); String getFilesConcatenated(); void setFilesConcatenated(String filesConcatenated); List<String> getFiles(); }
Service { protected static String cat(List<String> strings) { String str = ""; if (strings == null) { return str; } for (String s : strings) { if (!str.isEmpty()) { str += delimiter; } str += s; } return str; } Service();  Service(String serviceId, String slaXmlOptions, URI fileServerHost, List<String> files); int getId(); void setId(int id); String getServiceId(); void setServiceId(String serviceId); String getSlaXmlOptions(); void setSlaXmlOptions(String slaXmlOptions); URI getFileServerHost(); void setFileServerHost(URI fileServerHost); String getFilesConcatenated(); void setFilesConcatenated(String filesConcatenated); List<String> getFiles();  }