IdentityTemplateLibrary { static String encodeEntry(Entry<String, Point2d[]> entry) { StringBuilder sb = new StringBuilder(); sb.append(entry.getKey()); sb.append(' '); sb.append(encodeCoordinates(entry.getValue())); return sb.toString(); } private  IdentityTemplateLibrary(); IdentityTemplateLibrary add(IdentityTemplateLibrary library);  }
@Test public void encodeEntry() { String smiles = "CO"; Point2d[] points = new Point2d[]{new Point2d(12.5f, 5.5f), new Point2d(4f, 2f)}; String encoded = IdentityTemplateLibrary.encodeEntry(new SimpleEntry<String, Point2d[]>(smiles, points)); Map.Entry<String, Point2d[]> entry = IdentityTemplateLibrary.decodeEntry(encoded); assertThat(encoded, is("CO |(12.5,5.5,;4.0,2.0,)|")); }