FormatUtils { public static String joinLabels(Node node, String delimiter) { return getLabelsAsStream(node).collect(Collectors.joining(delimiter)); }  static String formatNumber(Number value); static String formatString(Object value); static String joinLabels(Node node, String delimiter); static Map<String,Object> toMap(Entity pc); static String toString(Object value); static String formatPoint(Point value); static List<String> getLabelsSorted(Node node);  }
@Test public void joinLabels() throws Exception { final String delimiter = ":"; try (Transaction tx = db.beginTx()) { Node node = tx.createNode(); assertEquals("", FormatUtils.joinLabels(node, delimiter)); node.addLabel(Label.label("label_a")); node.addLabel(Label.label("label_c")); node.addLabel(Label.label("label_b")); assertEquals("label_a:label_b:label_c", FormatUtils.joinLabels(node, delimiter)); } }