public void testSerialization() throws Exception
{
/** input stream */
InputStream is = getClass().getClassLoader().getResourceAsStream("" + TEST_FILE);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
NamespaceRegistryImpl nsm = new NamespaceRegistryImpl();
/** reading and writing */
List<NodeTypeData> ntdList1 = new CNDStreamReader(nsm).read(is);
new CNDStreamWriter(nsm).write(ntdList1, baos);
/** new reader to read previous output */
List<NodeTypeData> ntdList2 = new CNDStreamReader(nsm).read(new ByteArrayInputStream(baos.toByteArray()));