public void DeserializeLLSDSample()
{
OSD theSD = null;
OSDMap map = null;
OSD tempSD = null;
OSDUUID tempUUID = null;
OSDString tempStr = null;
OSDReal tempReal = null;
String testSD = "<?xml version='1.0' encoding='UTF-8'?> \n" +
"<llsd> \n" +
"<map> \n" +
"<key>region_id</key> \n" +
"<uuid>67153d5b-3659-afb4-8510-adda2c034649</uuid> \n" +
"<key>scale</key> \n" +
"<string>one minute</string> \n" +
"<key>simulator statistics</key> \n" +
"<map> \n" +
"<key>time dilation</key> \n" +
"<real>0.9878624</real> \n" +
"<key>sim fps</key> \n" +
"<real>44.38898</real> \n" +
"<key>agent updates per second</key> \n" +
"<real>nan</real> \n" +
"<key>total task count</key> \n" +
"<real>4</real> \n" +
"<key>active task count</key> \n" +
"<real>0</real> \n" +
"<key>pending uploads</key> \n" +
"<real>0.0001096525</real> \n" +
"</map> \n" +
"</map> \n" +
"</llsd>";
//Deserialize the string
byte[] bytes = Utils.stringToBytes(testSD);
theSD =XmlLLSDOSDParser.DeserializeLLSDXml(bytes);
//Confirm the contents
Assert.assertNotNull(theSD);
Assert.assertTrue(theSD instanceof OSDMap);
System.out.println(theSD.getType().toString());
Assert.assertTrue(theSD.getType() == OSDType.Map);
map = (OSDMap)theSD;
tempSD = map.get("region_id");
Assert.assertNotNull(tempSD);
Assert.assertTrue(tempSD instanceof OSDUUID);
Assert.assertTrue(tempSD.getType() == OSDType.UUID);
tempUUID = (OSDUUID)tempSD;
Assert.assertEquals(new UUID("67153d5b-3659-afb4-8510-adda2c034649"), tempUUID.asUUID());
tempSD = map.get("scale");
Assert.assertNotNull(tempSD);
Assert.assertTrue(tempSD instanceof OSDString);
Assert.assertTrue(tempSD.getType() == OSDType.String);