@Test
public void DeserializeURI() throws URISyntaxException
{
OSD theSD = null;
OSDArray array = null;
OSDUri tempURI = null;
String testSD = "<?xml version='1.0' encoding='UTF-8'?> \n" +
"<llsd> \n" +
"<array> \n" +
" <uri>http://sim956.agni.lindenlab.com:12035/runtime/agents</uri> \n" +
" <uri/> \n" +
"</array> \n" +
"</llsd>";
//Deserialize the string
byte[] bytes = Utils.stringToBytes(testSD);
theSD =XmlLLSDOSDParser.DeserializeLLSDXml(bytes);
Assert.assertTrue(theSD instanceof OSDArray);
array = (OSDArray)theSD;
Assert.assertEquals(OSDType.URI, array.get(0).getType());
tempURI = (OSDUri)array.get(0);
URI testURI = new URI("http://sim956.agni.lindenlab.com:12035/runtime/agents");
Assert.assertEquals(testURI, tempURI.asUri());
Assert.assertEquals(OSDType.URI, array.get(1).getType());
tempURI = (OSDUri)array.get(1);
Assert.assertEquals("", tempURI.asUri().toString());
}