assertEqualsSerially(mock.support, serMock.support);
}
public void testSerialization_Compatibility() throws Exception {
MockBeanContextDelegateS mock = new MockBeanContextDelegateS("main id");
BeanContextSupport support = mock.support;
support.addBeanContextMembershipListener(new MockBeanContextMembershipListener());
support.addBeanContextMembershipListener(new MockBeanContextMembershipListenerS("l2"));
support.addBeanContextMembershipListener(new MockBeanContextMembershipListenerS("l3"));
support.addBeanContextMembershipListener(new MockBeanContextMembershipListener());
support.add("abcd");
support.add(new MockBeanContextChild());
support.add(new MockBeanContextChildS("a child"));
support.add(new MockBeanContextChild());
support.add("1234");
SerializationTest.verifyGolden(this, mock, new SerializableAssert(){
public void assertDeserialized(Serializable orig, Serializable ser) {
MockBeanContextDelegateS serMock = (MockBeanContextDelegateS) ser;
MockBeanContextDelegateS mock = (MockBeanContextDelegateS) orig;
assertEquals(mock.id, serMock.id);