IdentityTemplateLibrary { static Entry<String, Point2d[]> decodeEntry(String str) { final int i = str.indexOf(' '); if (i < 0) throw new IllegalArgumentException(); return new SimpleEntry<String, Point2d[]>(str.substring(0, i), decodeCoordinates(str.substring(i + 1))); } private  IdentityTemplateLibrary(); IdentityTemplateLibrary add(IdentityTemplateLibrary library);  }
@Test public void decodeEntry() { String encode = "CO 12.500, 5.500, 4.000, 2.000"; Map.Entry<String, Point2d[]> entry = IdentityTemplateLibrary.decodeEntry(encode); assertThat(entry.getKey(), is("CO")); assertThat(entry.getValue(), is(new Point2d[]{new Point2d(12.5f, 5.5f), new Point2d(4f, 2f)})); }