@Test public void serializeMap() { boolean error = false; Map<Object, Object> bean = createTestMap(); try { Map map = (Map) BeanSerializer.serialize(bean, true); for (Map.Entry<Object, Object> entry : bean.entrySet()) { if (!map.containsKey(entry.getKey())) { error = true; break; } } Assert.assertFalse(error); map = (Map) BeanSerializer.serialize(bean); for (Map.Entry<Object, Object> entry : bean.entrySet()) { if (!map.containsKey(entry.getKey())) { error = true; break; } } Assert.assertFalse(error); } catch (Exception e) { error = true; } Assert.assertFalse(error); }
public static Object serialize(Object bean) throws NullPointerException { return serialize(bean, false); }
BeanSerializer { public static Object serialize(Object bean) throws NullPointerException { return serialize(bean, false); } }
BeanSerializer { public static Object serialize(Object bean) throws NullPointerException { return serialize(bean, false); }  }
BeanSerializer { public static Object serialize(Object bean) throws NullPointerException { return serialize(bean, false); }  static Object serialize(Object bean); static Object serialize(Object bean, boolean addType); static T deserializeByType(Object src, Class<T> clazz); static Object deserialize(Object object); }
BeanSerializer { public static Object serialize(Object bean) throws NullPointerException { return serialize(bean, false); }  static Object serialize(Object bean); static Object serialize(Object bean, boolean addType); static T deserializeByType(Object src, Class<T> clazz); static Object deserialize(Object object);  }