}
@Test
public void testMarshalHandlerClass() throws JSONMarshalerException, IOException, ParserException, IllegalAccessException, InstantiationException, ClassNotFoundException {
System.out.println("testMarshalHandlerClass");
HandlerConfiguration config = new HandlerConfiguration();
Map<String, Class<?>> handlers = new HashMap<String, Class<?>>();
handlers.put("http", JSON.class);
handlers.put("ftp", JSONMarshaler.class);
config.setHandlers(handlers);
JSON outputJSON = JSONMarshaler.marshalObject(config);
System.out.println("Output JSON (no codec):" + outputJSON);
JSONMarshaler.registerCodec(Class.class, ClassJSONValueCodec.class);
outputJSON = JSONMarshaler.marshalObject(config);
System.out.println("Output JSON (codec):" + outputJSON);
HandlerConfiguration reload = (HandlerConfiguration) JSONMarshaler.marshalJSON(outputJSON, config.getClass());
assertNotNull(reload);
assertEquals(config.getHandlers(), reload.getHandlers());
}