+ @Test
+ public void testSchemaPathSerialization() throws Exception {
+ final SchemaPath expected = SchemaPath.create(true, TestModel.ANY_XML_QNAME);
+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ NormalizedNodeDataOutput nnout = NormalizedNodeInputOutput.newDataOutput(ByteStreams.newDataOutput(bos));
+ nnout.writeSchemaPath(expected);
+
+ NormalizedNodeDataInput nnin = NormalizedNodeInputOutput.newDataInput(ByteStreams.newDataInput(
+ bos.toByteArray()));
+ SchemaPath actual = nnin.readSchemaPath();
+ assertEquals(expected, actual);