@Test
public void store() throws IOException {

    IdentityTemplateLibrary lib = IdentityTemplateLibrary.empty();
    lib.add(IdentityTemplateLibrary.decodeEntry("[C][C][O] 0, 1, 2, 3, 4, 5"));
    lib.add(IdentityTemplateLibrary.decodeEntry("[C][C] 0, 1, 2, 3"));
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    lib.store(baos);
    baos.close();
    assertThat(new String(baos.toByteArray()),
            is("[C][C][O] |(.0,1.0,;2.0,3.0,;4.0,5.0,)|\n[C][C] |(.0,1.0,;2.0,3.0,)|\n"));
}