mapping = new SynchronizedMapping();
InputSource is = new InputSource( new FileReader(map) );
is.setSystemId( mapFile );
mapping.loadMapping( is );
Unmarshaller unmarshaller = new Unmarshaller(mapping);
ConfigElement rootset = (ConfigElement)unmarshaller.unmarshal(reader);
assertTrue(rootset.getName().equals("theRootSet"));
Iterator params = rootset.getParameterIterator();
Parameter param = (Parameter)params.next();
assertTrue(param.getName().equals("city"));
assertTrue(param.getValue().equals("Atlanta"));
param = (Parameter)params.next();
assertTrue(param.getName().equals("state"));
assertTrue(param.getValue().equals("Georgia"));
param = (Parameter)params.next();
assertTrue(param.getName().equals("country"));
assertTrue(param.getValue().equals("USA"));
assertTrue(rootset.getParameterValue("city").equals("Atlanta"));
assertTrue(rootset.getParameterValue("country").equals("USA"));
assertTrue(rootset.getParameter("state").getValue().equals("Georgia"));
}
catch (Exception e)
{
String errmsg = "Error in psml mapping creation: " + e.toString();