public void testSerialization() throws Exception {
final BeanContextServicesSupport ctx = new BeanContextServicesSupport(
null, Locale.FRANCE, false, false);
final BeanContextServicesSupport ctx2 = new BeanContextServicesSupport(
ctx, Locale.ITALY, true, true);
BeanContextEvent event = new MockBeanContextEvent(ctx2);
event.setPropagatedFrom(ctx);
SerializationTest.verifySelf(event, new SerializableAssert(){
public void assertDeserialized(Serializable arg0, Serializable arg1) {
BeanContextEvent e1 = (BeanContextEvent)arg0;
BeanContextEvent e2 = (BeanContextEvent)arg1;
assertNull((BeanContextServicesSupport)e2.getSource());
assertNotNull((BeanContextServicesSupport)e1.getSource());
assertEqualsSerially((BeanContextServicesSupport)e1.getPropagatedFrom(), (BeanContextServicesSupport)e2.getPropagatedFrom());
assertEqualsSerially(ctx, (BeanContextServicesSupport)e2.getPropagatedFrom());
}
});
}