converterLookup = new DefaultConverterLookup();
mashallingContext = new DefaultMarshallingContext(converterLookup, streamWriter);
}
public void testShouldSerializeMap() throws Exception {
MapConverter ms = new MapConverter();
assertTrue(ms.canConvert(HashMap.class));
assertFalse(ms.canConvert(null));
Map m = new HashMap();
m.put("string", "value");
ms.marshal(m, mashallingContext, streamWriter);
assertEquals("<map>" +
"<type>java.util.HashMap</type>" +
"<string>string</string>" +
"<string>value</string>" +
"</map>", stringWriter.getBuffer().toString());